]> git.neil.brown.name Git - history.git/commit
[PATCH] (9/15) big struct block_device * push (first series)
authorAlexander Viro <viro@math.psu.edu>
Thu, 25 Apr 2002 06:50:28 +0000 (23:50 -0700)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Thu, 25 Apr 2002 06:50:28 +0000 (23:50 -0700)
commit79c2cfb85fd83474e12f95ad85624eb421f4b6ea
tree8f7efa3eb8ed7f2da825ac08c60c3951f757a8ab
parenteec08e21be012356dc94b0266419696f53b8d5d8
[PATCH] (9/15) big struct block_device * push (first series)

 - this one is interesting and will play in the next series as well;
   affected place is fs/block_dev.c::do_open().  We check if bdev is
   a partition (same way it is done in generic_make_request()) and
   if it is - open entire disk and put pointer to its bdev into a
   new field bdev->bd_contains.  Otherwise (non-partition) we
   set bdev->bd_contains to bdev.  Corresponding cleanup done in
   blkdev_put() (and failure path in do_open()) - when the last opener
   goes away we close bdev->bd_contains if bdev is a partition (i.e.
   not equal to its ->bd_contains) and set it to NULL.
   Immediate effect is that we can get from bdev of partition to
   bdev of disk when submitting a bio, but it also opens a way
   to handle partition-parsing in a sane way.  That will be done
   in the next series.
fs/block_dev.c
fs/partitions/check.c
include/linux/fs.h