Oops,
this is a bigger patch bomb than intended. Only patches 1-23 are this
series which should be ready to be applied once for-5.11/block pulles in
5.10-rc4.
After that follow patches already in for-5.11/block and my current hot
off the press development branch.
--
dm-devel mailing list
dm-dev
Move the validation of the block from the callers into nbd_set_size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Josef Bacik
---
drivers/block/nbd.c | 47 +++--
1 file changed, 15 insertions(+), 32 deletions(-)
diff --git a/drivers/block/nbd.c b
Hi Jens,
this series builds on top of the work that went into the last merge window,
and make sure we have a single coherent interfac for updating the size of a
block device.
Changes since v2:
- rebased to the set_capacity_revalidate_and_notify in mainline
- keep the loop_set_size function
- f
merged with the update of the
block device size by using set_capacity_and_notify. As an extra
bonus this also adds proper uevent notifications for the resize.
Signed-off-by: Christoph Hellwig
---
drivers/block/aoe/aoecmd.c | 15 ---
1 file changed, 4 insertions(+), 11 deletions
Block driver have no business setting the file system concept of a
block size.
Signed-off-by: Christoph Hellwig
Reviewed-by: Josef Bacik
---
drivers/block/nbd.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index
When setting the whole device read-only (or clearing the read-only
state), also update the policy for all partitions. The s390 dasd
driver has awlways been doing this and it makes a lot of sense.
Signed-off-by: Christoph Hellwig
---
block/ioctl.c | 5 -
1 file changed, 4 insertions(+), 1
Use set_disk_ro instead of set_device_ro to match all other block
drivers and to ensure all partitions mirror the read-only flag.
Signed-off-by: Christoph Hellwig
---
drivers/block/loop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/loop.c b/drivers/block
None of the ->resize methods updates the disk size, so calling
revalidate_disk_size here won't do anything.
Signed-off-by: Christoph Hellwig
Acked-by: Song Liu
---
drivers/md/md-cluster.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/md/md-cluster.c b/drivers/md/md-c
BLKFLSBUF is not supposed to actually send a flush command to the device,
but to tear down buffer cache structures. Remove the mtd_blkdevs
implementation and just use the default semantics instead.
Signed-off-by: Christoph Hellwig
Acked-by: Richard Weinberger
---
drivers/mtd/mtd_blkdevs.c
Add a callback to the major_names array that allows a driver to override
how to probe for dev_t that doesn't currently have a gendisk registered.
This will help separating the lookup of the gendisk by dev_t vs probe
action for a not currently registered dev_t.
Signed-off-by: Christoph He
Implement the ->set_read_only method instead of parsing the actual
ioctl command.
Signed-off-by: Christoph Hellwig
---
drivers/s390/block/dasd.c | 1 +
drivers/s390/block/dasd_int.h | 3 ++-
drivers/s390/block/dasd_ioctl.c | 27 +--
3 files changed,
Fold set_device_ro into its only remaining caller.
Signed-off-by: Christoph Hellwig
---
block/genhd.c | 7 ---
block/ioctl.c | 2 +-
include/linux/genhd.h | 1 -
3 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/block/genhd.c b/block/genhd.c
index 8c350fecfe8bfe
Merge nbd_size_set and nbd_size_update into a single function that also
updates the nbd_config fields. This new function takes the device size
in bytes as the first argument, and the blocksize as the second argument,
simplifying the calculations required in most callers.
Signed-off-by: Christoph
Add a new method to allow for driver-specific processing when setting or
clearing the block device read-only state. This allows to replace the
cumbersome and error-prone override of the whole ioctl implementation.
Signed-off-by: Christoph Hellwig
---
block/ioctl.c | 5 +
include
Instead of reusing the ranges in bdev_map, add a new helper that is
called if no ranges was found. This is a first step to unpeel and
eventually remove the complex ranges structure.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
---
block/genhd.c | 25
nbd_size_update is about to acquire a few more callers, so lift the check
into the function.
Signed-off-by: Christoph Hellwig
Reviewed-by: Josef Bacik
---
drivers/block/nbd.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/block/nbd.c b/drivers/block
Split the block_class_lock mutex into one each to protect bdev_map
and major_names.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
---
block/genhd.c | 29 +++--
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/block/genhd.c b/block/genhd.c
Implement the ->set_read_only method instead of parsing the actual
ioctl command.
Signed-off-by: Christoph Hellwig
Acked-by: Ilya Dryomov
---
drivers/block/rbd.c | 40
1 file changed, 4 insertions(+), 36 deletions(-)
diff --git a/drivers/block/rbd.
because so many people use partitions, for which no
invalidation was performed anyway.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
---
fs/block_dev.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 9e84b1928b9401..66ebf594c97f47 10
This avoids the extra call to revalidate_disk_size in sd_rescan and
is otherwise a no-op because the size did not change, or we are in
the probe path.
Signed-off-by: Christoph Hellwig
Acked-by: Martin K. Petersen
Reviewed-by: Hannes Reinecke
---
drivers/scsi/sd.c | 8 +++-
1 file changed
revalidate_disk_size just updates the block device size from the disk
size. Thus calling it from virtblk_update_cache_mode doesn't actually
do anything.
Signed-off-by: Christoph Hellwig
Acked-by: Stefan Hajnoczi
Acked-by: Michael S. Tsirkin
---
drivers/block/virtio_blk.c | 1 -
1
Hi Jens, Minchan and Mike,
this series cleans up a few interactions of driver with struct
block_device, in preparation for big changes to struct block_device
that I plan to send soon.
Diffstat:
block/loop.c |3 -
block/mtip32xx/mtip32xx.c | 15
block/mtip32xx/mtip32xx
We don't really need the struct block_device to initialize a bio. So
switch from using bio_set_dev to manually setting up bi_disk (bi_partno
will always be zero and has been cleared by bio_init already).
Signed-off-by: Christoph Hellwig
---
drivers/md/dm.c | 12 +++-
1 file chang
Get rid of the long-lasting struct block_device reference in
struct mapped_device. The only remaining user is the freeze code,
where we can trivially look up the block device at freeze time
and release the reference at thaw time.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-core.h | 2
set_blocksize is used by file systems to use their preferred buffer cache
block size. Block drivers should not set it.
Signed-off-by: Christoph Hellwig
---
drivers/block/zram/zram_drv.c | 11 +--
drivers/block/zram/zram_drv.h | 1 -
2 files changed, 1 insertion(+), 11 deletions
block device that is not open.
Signed-off-by: Christoph Hellwig
---
drivers/block/zram/zram_drv.c | 72 ---
1 file changed, 15 insertions(+), 57 deletions(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 6d15d51cee2b7e
set_blocksize is used by file systems to use their preferred buffer cache
block size. Block drivers should not set it.
Signed-off-by: Christoph Hellwig
---
drivers/block/loop.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index
del_gendisk already calls fsync_bdev for every partition, no need
to do this twice.
Signed-off-by: Christoph Hellwig
---
drivers/block/mtip32xx/mtip32xx.c | 15 ---
drivers/block/mtip32xx/mtip32xx.h | 2 --
2 files changed, 17 deletions(-)
diff --git a/drivers/block/mtip32xx
On Tue, Nov 17, 2020 at 10:46:29AM -0500, Mike Snitzer wrote:
> On Mon, Nov 16 2020 at 4:20pm -0500,
> Christoph Hellwig wrote:
>
> > Hi Jens, Minchan and Mike,
> >
> > this series cleans up a few interactions of driver with struct
> > block_device, in prep
Use the block layer helper to update both the disk and block device
sizes. Contrary to the name no notification is sent in this case,
as a size 0 is special cased.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
---
drivers/nvme/host/core.c | 13 +
1 file changed, 1
Use set_capacity_and_notify to set the size of both the disk and block
device. This also gets the uevent notifications for the resize for free.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
---
drivers/md/dm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
Use set_capacity_and_notify to set the size of both the disk and block
device. This also gets the uevent notifications for the resize for free.
Signed-off-by: Christoph Hellwig
Acked-by: Song Liu
---
drivers/md/md-cluster.c | 6 ++
drivers/md/md-linear.c | 3 +--
drivers/md/md.c
The update_bdev argument is always set to true, so remove it. Also
rename the function to the slighly less verbose set_capacity_and_notify,
as propagating the disk size to the block device isn't really
revalidation.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
Review
Use set_capacity_and_notify to set the size of both the disk and block
device. This also gets the uevent notifications for the resize for free.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_main.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers
There is no good reason to call revalidate_disk_size separately.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
---
drivers/nvme/host/core.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index
There is no good reason to call revalidate_disk_size separately.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
---
drivers/block/loop.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index a58084c2ed7ceb
Use set_capacity_and_notify to update the disk and block device sizes and
send a RESIZE uevent to userspace. Note that blktests relies on uevents
being sent also for updates that did not change the device size, so the
explicit kobject_uevent remains for that case.
Signed-off-by: Christoph
Use set_capacity_and_notify to set the size of both the disk and block
device. This also gets the uevent notifications for the resize for free.
Signed-off-by: Christoph Hellwig
---
drivers/block/zram/zram_drv.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers
Use set_capacity_and_notify to set the size of both the disk and block
device. This also gets the uevent notifications for the resize for free.
Signed-off-by: Christoph Hellwig
Acked-by: Ilya Dryomov
---
drivers/block/rbd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a
Use set_capacity_and_notify to set the size of both the disk and block
device. This also gets the uevent notifications for the resize for free.
Signed-off-by: Christoph Hellwig
Acked-by: Jack Wang
---
drivers/block/rnbd/rnbd-clt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff
Use set_capacity_and_notify to set the size of both the disk and block
device. This also gets the uevent notifications for the resize for free.
Signed-off-by: Christoph Hellwig
---
drivers/block/pktcdvd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/block
Use set_capacity_and_notify to set the size of both the disk and block
device. This also gets the uevent notifications for the resize for free.
Signed-off-by: Christoph Hellwig
Reviewed-by: Hannes Reinecke
---
drivers/md/dm-raid.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff
The code in devt_from_partuuid is very convoluted. Refactor a bit by
sanitizing the goto and variable name usage.
Signed-off-by: Christoph Hellwig
---
init/do_mounts.c | 68 ++--
1 file changed, 31 insertions(+), 37 deletions(-)
diff --git a/init
Hi Jens,
this series cleans up our main per-device node data structure by merging
the block_device and hd_struct data structures that have the same scope,
but different life times. The main effect (besides removing lots of
code) is that instead of having two device sizes that need complex
synchro
Reorder the code to have one big section for the last close, and to use
bdev_is_partition.
Signed-off-by: Christoph Hellwig
---
fs/block_dev.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 29db12c3bb501c..4c4d6c30382c06
gets fixed.
Signed-off-by: Christoph Hellwig
---
block/bio.c| 2 +-
block/blk-core.c | 2 +-
block/blk.h| 53 --
block/genhd.c | 34 +++---
block/partitions/core.c| 17
Use put_device to put the device instead of poking into the internals
and using kobject_put.
Signed-off-by: Christoph Hellwig
---
block/genhd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/genhd.c b/block/genhd.c
index 0bd9c41dd4cb69..f46e89226fdf91 100644
--- a
Split each case into a self-contained helper.
Signed-off-by: Christoph Hellwig
---
include/linux/genhd.h | 7 +-
init/do_mounts.c | 183 +-
2 files changed, 91 insertions(+), 99 deletions(-)
diff --git a/include/linux/genhd.h b/include/linux
Avoid a totally pointless goto label, and use the same style of
comparism for both helpers.
Signed-off-by: Christoph Hellwig
---
init/do_mounts.c | 18 ++
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/init/do_mounts.c b/init/do_mounts.c
index afa26a4028d25e
Just open code the wait in the only caller of both functions.
Signed-off-by: Christoph Hellwig
---
fs/internal.h | 2 ++
fs/quota/quota.c | 31 +---
fs/super.c | 51 ++
include/linux/fs.h | 4 +---
4 files
Don't bother to call lookup_bdev for just a slightly different error
message without any functional change.
Signed-off-by: Christoph Hellwig
---
drivers/md/bcache/super.c | 44 +--
1 file changed, 1 insertion(+), 43 deletions(-)
diff --git a/drive
Call disk_part_iter_exit in disk_part_iter_next instead of duplicating
the functionality.
Signed-off-by: Christoph Hellwig
---
block/genhd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/block/genhd.c b/block/genhd.c
index 4e039524f92b8f..0bd9c41dd4cb69 100644
--- a
disk_get_part needs to be paired with a disk_put_part.
Fixes: ef45fe470e1 ("blk-cgroup: show global disk stats in root cgroup io.stat")
Signed-off-by: Christoph Hellwig
---
block/blk-cgroup.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/blk-cgroup.c b/block/blk-cgro
Signed-off-by: Christoph Hellwig
---
include/linux/genhd.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 46553d6d602563..22f5b9fd96f8bf 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -250,7 +250,6 @@ static inline dev_t
ng of struct block_device to keep the lookups contained
in the core block layer code.
Signed-off-by: Christoph Hellwig
---
block/ioctl.c| 3 +-
drivers/block/loop.c | 8 +-
drivers/md/dm-table.c| 9 +-
driver
Use file->f_mapping in all remaining places that have a struct file
available to properly handle the case where inode->i_mapping !=
file_inode(file)->i_mapping.
Signed-off-by: Christoph Hellwig
---
mm/filemap.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff -
: Christoph Hellwig
---
block/blk-cgroup.c | 42
block/blk-iocost.c | 36 +++
block/blk.h| 2 +-
block/genhd.c | 204 -
block/partitions/core.c| 28 ++---
fs/block_dev.c | 123
Adding the minor to the major creates tons of pointless conflicts. Just
use the dev_t itself, which is 32-bits and thus is guaranteed to fit
into ino_t.
Signed-off-by: Christoph Hellwig
---
fs/block_dev.c | 26 ++
1 file changed, 2 insertions(+), 24 deletions(-)
diff
We can just dereference the point in struct gendisk instead. Also
remove the now unused export.
Signed-off-by: Christoph Hellwig
---
block/genhd.c | 1 -
drivers/block/nbd.c | 4 +---
drivers/block/xen-blkfront.c| 20 +---
drivers/block/zram
Add a little helper to find the kobject for a struct block_device.
Signed-off-by: Christoph Hellwig
---
drivers/md/bcache/super.c | 7 ++-
drivers/md/md.c | 4 +---
fs/btrfs/sysfs.c | 15 +++
include/linux/blk_types.h | 3 +++
4 files changed, 9 insertions
Now that each hd_struct has a reference to the corresponding
block_device, there is no need for the bd_contains pointer. Add
a bdev_whole() helper to look up the whole device block_device
struture instead.
Signed-off-by: Christoph Hellwig
---
drivers/scsi/scsicam.c| 2 +-
fs/block_dev.c
device model reference front ending it for device
model interaction. The percpu refcount in struct hd_struct is entirely
gone given that struct block_device must be opened and thus valid for
the duration of the I/O.
Signed-off-by: Christoph Hellwig
---
block/bio.c| 6
Stop passing the whole device as a separate argument given that it
can be trivially deducted.
Signed-off-by: Christoph Hellwig
---
drivers/block/loop.c | 12 +++-
fs/block_dev.c | 69 +++---
include/linux/blkdev.h | 6 ++--
3 files changed, 38
On Wed, Nov 18, 2020 at 09:56:11AM +0100, Jan Beulich wrote:
> since this isn't the first series from you recently spamming
> xen-devel, may I ask that you don't Cc entire series to lists
> which are involved with perhaps just one out of the many patches?
> IMO Cc lists should be compiled on a per-
On Wed, Nov 18, 2020 at 10:04:04AM +0100, Jan Beulich wrote:
> That's the view of some people, but not all. Context can be easily
> established by those who care going to one of the many archives on
> which the entire series lands. Getting spammed, however, can't be
> avoided by the dozens or hundr
On Wed, Nov 18, 2020 at 04:54:51PM +0800, Coly Li wrote:
> On 11/18/20 4:47 PM, Christoph Hellwig wrote:
> > Don't bother to call lookup_bdev for just a slightly different error
> > message without any functional change.
> >
> > Signed-off-by: Christoph Hellwig
On Wed, Nov 18, 2020 at 03:37:47PM +0100, Jan Kara wrote:
> > -static inline dev_t blk_lookup_devt(const char *name, int partno)
> > -{
> > - dev_t devt = MKDEV(0, 0);
> > - return devt;
> > -}
> > #endif /* CONFIG_BLOCK */
>
> This hunk looks unrelated to the change? Also why you move the de
On Thu, Nov 19, 2020 at 09:25:05AM +0100, Jan Kara wrote:
> OK, understood. Still it would seem more logical to leave blk_lookup_devt()
> declaration inside #ifdef CONFIG_BLOCK and just delete the !CONFIG_BLOCK
> definition (to make it clear we ever expect only users compiled when
> CONFIG_BLOCK is
On Thu, Nov 19, 2020 at 10:41:57AM +0100, Jan Kara wrote:
> > rcu_assign_pointer(ptbl->part[0], &disk->part0);
> > @@ -1772,8 +1626,10 @@ struct gendisk *__alloc_disk_node(int minors, int
> > node_id)
> > * converted to make use of bd_mutex and sequence counters.
> > */
> > hd_se
On Thu, Nov 19, 2020 at 11:32:53AM +0100, Jan Kara wrote:
> > @@ -1521,7 +1510,7 @@ static int __blkdev_get(struct block_device *bdev,
> > fmode_t mode, void *holder,
> > if (bdev->bd_bdi == &noop_backing_dev_info)
> > bdev->bd_bdi = bdi_get(disk->queue->backing_dev
On Thu, Nov 19, 2020 at 01:05:25PM +0100, Jan Kara wrote:
> > @@ -613,7 +613,7 @@ void guard_bio_eod(struct bio *bio)
> > rcu_read_lock();
> > part = __disk_get_part(bio->bi_disk, bio->bi_partno);
> > if (part)
> > - maxsector = part_nr_sects_read(part);
> > + maxsec
On Thu, Nov 19, 2020 at 03:39:21PM +0100, Jan Kara wrote:
> This patch is kind of difficult to review due to the size of mostly
> mechanical changes mixed with not completely mechanical changes. Can we
> perhaps split out the mechanical bits? E.g. the rq->part => rq->bdev
> renaming is mechanical a
On Thu, Nov 19, 2020 at 03:13:16PM +, Matthew Wilcox wrote:
> On Wed, Nov 18, 2020 at 09:47:57AM +0100, Christoph Hellwig wrote:
> > @@ -2887,13 +2887,13 @@ EXPORT_SYMBOL(filemap_map_pages);
> > vm_fault_t filemap_page_mkwrite(struct vm_fault *vmf)
> > {
> > st
On Fri, Nov 20, 2020 at 12:21:21PM +0100, Jan Kara wrote:
> > > AFAICT bd_size_lock is pointless after these changes so we can just remove
> > > it?
> >
> > I don't think it is, as reuqiring bd_mutex for size updates leads to
> > rather awkward lock ordering problems.
>
> OK, let me ask different
On Fri, Nov 20, 2020 at 03:59:56PM +, Matthew Wilcox wrote:
> > Exactly. In theory we could skip it for 64-bit, but as updating the
> > size isn't a fast path, and struct block_device isn't super size critical
> > I'd rather keep the same code for 32 vs 64-bit builds.
>
> Is it better to swit
On Fri, Nov 20, 2020 at 09:05:48PM +0100, Jan Kara wrote:
> The code is already switched to it AFAICT (the lock is really only used in
> the two places that write i_size). But the problem is that in theory two
> i_size_write() calls can race in a way that the resulting stored i_size is a
> mix of t
Move the make_it_fail flag to struct block_device an turn it into a bool
in preparation of killing struct hd_struct.
Signed-off-by: Christoph Hellwig
---
block/blk-core.c | 3 ++-
block/genhd.c | 4 ++--
include/linux/blk_types.h | 3 +++
include/linux/genhd.h | 3
Switch the partition iter infrastructure to iterate over block_device
references instead of hd_struct ones mostly used to get at the
block_device.
Signed-off-by: Christoph Hellwig
---
block/genhd.c | 57 +++
block/partitions/core.c | 13
Just use the bd_partno field in struct block_device everywhere.
Signed-off-by: Christoph Hellwig
---
block/genhd.c | 12 ++--
block/partitions/core.c | 9 -
include/linux/genhd.h | 1 -
init/do_mounts.c| 2 +-
4 files changed, 11 insertions(+), 13
bd_part is never NULL for a block device in use by a file system, so
remove the checks.
Signed-off-by: Christoph Hellwig
---
fs/f2fs/checkpoint.c | 5 +
fs/f2fs/sysfs.c | 9 -
2 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs
Use struct block_device to lookup partitions on a disk. This removes
all usage of struct hd_struct from the I/O path, and this allows removing
the percpu refcount in struct hd_struct.
Signed-off-by: Christoph Hellwig
---
block/bio.c| 4 +-
block/blk-core.c
Pass the block_device actually needed instead of the hd_struct.
Signed-off-by: Christoph Hellwig
---
block/blk.h | 2 +-
block/genhd.c | 14 +++---
block/partitions/core.c | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/block/blk.h b/block
We can just dereference the point in struct gendisk instead. Also
remove the now unused export.
Signed-off-by: Christoph Hellwig
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jan Kara
---
block/genhd.c | 1 -
drivers/block/nbd.c | 4 +---
drivers/block/xen
Move the policy field to struct block_device and rename it to the
more descriptive bd_read_only. Also turn the field into a bool as it
is used as such.
Signed-off-by: Christoph Hellwig
---
block/blk-core.c | 2 +-
block/genhd.c | 8
block/ioctl.c | 2
Move the dkstats and stamp field to struct block_device in preparation
of killing struct hd_struct.
Signed-off-by: Christoph Hellwig
---
block/blk-cgroup.c| 2 +-
block/blk-core.c | 4 ++--
block/blk.h | 1 -
block/genhd.c | 14 --
block
Pass the block_device actually needed instead of looking it up using
bdget_disk.
Signed-off-by: Christoph Hellwig
---
block/genhd.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/block/genhd.c b/block/genhd.c
index 498c816e90df64..2985740eab084b 100644
--- a
device model reference front ending it for device
model interaction. The percpu refcount in struct hd_struct is entirely
gone given that struct block_device must be opened and thus valid for
the duration of the I/O.
Signed-off-by: Christoph Hellwig
---
block/blk-cgroup.c| 9 ++-
block
. The lifetime of struct gendisk is still controlled by
the struct device embedded in the part0 hd_struct.
Signed-off-by: Christoph Hellwig
---
block/blk-core.c | 16 ---
block/blk-flush.c | 2 +-
block/blk-merge.c | 2 -
block/blk.h
Use put_device to put the device instead of poking into the internals
and using kobject_put.
Signed-off-by: Christoph Hellwig
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jan Kara
Reviewed-by: Johannes Thumshirn
---
block/genhd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
sector_t is now always a u64, so this check is not needed.
Signed-off-by: Christoph Hellwig
---
block/ioctl.c | 9 -
1 file changed, 9 deletions(-)
diff --git a/block/ioctl.c b/block/ioctl.c
index 6b785181344fe1..0c09bb7a6ff35f 100644
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -35,15
Signed-off-by: Christoph Hellwig
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jan Kara
Reviewed-by: Johannes Thumshirn
---
include/linux/genhd.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 46553d6d602563..22f5b9fd96f8bf 100644
--- a
Adding the minor to the major creates tons of pointless conflicts. Just
use the dev_t itself, which is 32-bits and thus is guaranteed to fit
into ino_t.
Signed-off-by: Christoph Hellwig
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jan Kara
---
fs/block_dev.c | 26 ++
1
media.
Signed-off-by: Christoph Hellwig
---
block/blk-cgroup.c | 42 +++---
block/blk-iocost.c | 36
include/linux/blk-cgroup.h | 4 ++--
3 files changed, 41 insertions(+), 41 deletions(-)
diff --git a/block/blk
Now that struct hd_struct has a block_device pointer use that to
find the disk.
Signed-off-by: Christoph Hellwig
---
include/linux/genhd.h | 10 +++---
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index d068e46f9086ae
, similar to what we do with normal
file operations.
Signed-off-by: Christoph Hellwig
---
fs/block_dev.c | 185 +++--
1 file changed, 86 insertions(+), 99 deletions(-)
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 88847839ef0102..2ffa11a95f10db 100644
Stop passing the whole device as a separate argument given that it
can be trivially deducted and cleanup the !holder debug check.
Signed-off-by: Christoph Hellwig
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jan Kara
---
drivers/block/loop.c | 12 +-
fs/block_dev.c | 51
Call disk_part_iter_exit in disk_part_iter_next instead of duplicating
the functionality.
Signed-off-by: Christoph Hellwig
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Jan Kara
Reviewed-by: Johannes Thumshirn
---
block/genhd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff
Hi Jens,
this series cleans up our main per-device node data structure by merging
the block_device and hd_struct data structures that have the same scope,
but different life times. The main effect (besides removing lots of
code) is that instead of having two device sizes that need complex
synchro
del_gendisk already calls fsync_bdev for every partition, no need
to do this twice.
Signed-off-by: Christoph Hellwig
---
drivers/block/mtip32xx/mtip32xx.c | 15 ---
drivers/block/mtip32xx/mtip32xx.h | 2 --
2 files changed, 17 deletions(-)
diff --git a/drivers/block/mtip32xx
Move the partition_meta_info to struct block_device in preparation for
killing struct hd_struct.
Signed-off-by: Christoph Hellwig
---
block/blk.h | 1 -
block/genhd.c | 3 ++-
block/partitions/core.c | 18 +++---
fs/block_dev.c| 1
401 - 500 of 1377 matches
Mail list logo