Re: [PATCH 7/5] block: clean up blkdev_get() wrappers and their users

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, 2010-11-11 at 18:11 +0100, Tejun Heo wrote:
> After recent blkdev_get() modifications, open_by_devnum() and
> open_bdev_exclusive() are simple wrappers around blkdev_get().
> Replace them with blkdev_get_by_dev() and blkdev_get_by_path().
> 
> blkdev_get_by_dev() is identical to open_by_devnum().
> blkdev_get_by_path() is slightly different in that it doesn't
> automatically add %FMODE_EXCL to @mode.
> 
> All users are converted.  Most conversions are mechanical and don't
> introduce any behavior difference.  There are several exceptions.
> 
> * btrfs now sets FMODE_EXCL in btrfs_device->mode, so there's no
>   reason to OR it explicitly on blkdev_put().
> 
> * gfs2, nilfs2 and the generic mount_bdev() now set FMODE_EXCL in
>   sb->s_mode.
> 
> * With the above changes, sb->s_mode now always should contain
>   FMODE_EXCL.  WARN_ON_ONCE() added to kill_block_super() to detect
>   errors.
> 
> The new blkdev_get_*() functions are with proper docbook comments.
> While at it, add function description to blkdev_get() too.
> 
> Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
> Cc: Philipp Reisner <philipp.reisner@xxxxxxxxxx>
> Cc: Neil Brown <neilb@xxxxxxx>
> Cc: Mike Snitzer <snitzer@xxxxxxxxxx>
> Cc: Joern Engel <joern@xxxxxxxxxxxxxxx>
> Cc: Chris Mason <chris.mason@xxxxxxxxxx>
> Cc: Jan Kara <jack@xxxxxxx>
> Cc: "Theodore Ts'o" <tytso@xxxxxxx>
> Cc: KONISHI Ryusuke <konishi.ryusuke@xxxxxxxxxxxxx>
> Cc: reiserfs-devel@xxxxxxxxxxxxxxx
> Cc: xfs-masters@xxxxxxxxxxx
> Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>
Acked-by: Steven Whitehouse <swhiteho@xxxxxxxxxx>

Steve.


--
To unsubscribe from this list: send the line "unsubscribe reiserfs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux File System Development]     [Linux BTRFS]     [Linux NFS]     [Linux Filesystems]     [Ext4 Filesystem]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Resources]

  Powered by Linux