Displaying 10 results from an estimated 10 matches for "bdget_disk".
2012 Feb 16
2
[PATCH] blkfront: don't put bdev right after getting it
...ff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 2f22874..5d45688 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1410,7 +1410,6 @@ static int blkif_release(struct gendisk *disk, fmode_t mode)
mutex_lock(&blkfront_mutex);
bdev = bdget_disk(disk, 0);
- bdput(bdev);
if (bdev->bd_openers)
goto out;
@@ -1441,6 +1440,7 @@ static int blkif_release(struct gendisk *disk, fmode_t mode)
}
out:
+ bdput(bdev);
mutex_unlock(&blkfront_mutex);
return 0;
}
--
1.7.7.5
2012 Feb 16
2
[PATCH] blkfront: don't put bdev right after getting it
...ff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 2f22874..5d45688 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1410,7 +1410,6 @@ static int blkif_release(struct gendisk *disk, fmode_t mode)
mutex_lock(&blkfront_mutex);
bdev = bdget_disk(disk, 0);
- bdput(bdev);
if (bdev->bd_openers)
goto out;
@@ -1441,6 +1440,7 @@ static int blkif_release(struct gendisk *disk, fmode_t mode)
}
out:
+ bdput(bdev);
mutex_unlock(&blkfront_mutex);
return 0;
}
--
1.7.7.5
2016 Jun 30
0
[PATCH v2 02/12] genhd: Honor gen_uevent and add disk_gen_uevents
...u, struct hd_struct *part);
/* block/genhd.c */
extern void add_disk(struct gendisk *disk, bool gen_uevent);
extern void del_gendisk(struct gendisk *gp);
+extern void disk_gen_uevents(struct gendisk *disk);
extern struct gendisk *get_gendisk(dev_t dev, int *partno);
extern struct block_device *bdget_disk(struct gendisk *disk, int partno);
--
2.9.0
2016 Jun 30
17
[PATCH v2 00/12] gendisk: Generate uevent after attribute available
The race condition is noticed between disk_add() and disk attributes, on
virtio-blk hotplug.
Userspace listens to the KOBJ_ADD uevent generated in add_disk(). At that
point we haven't created the serial attribute file, therefore depending
on how fast udev reacts, the /dev/disk/by-id/ entry doesn't always get
created.
As pointed out by Christoph Hellwig in the specific fix [1], virtio-blk
2016 Jun 30
17
[PATCH v2 00/12] gendisk: Generate uevent after attribute available
The race condition is noticed between disk_add() and disk attributes, on
virtio-blk hotplug.
Userspace listens to the KOBJ_ADD uevent generated in add_disk(). At that
point we haven't created the serial attribute file, therefore depending
on how fast udev reacts, the /dev/disk/by-id/ entry doesn't always get
created.
As pointed out by Christoph Hellwig in the specific fix [1], virtio-blk
2020 Sep 01
10
remove revalidate_disk()
Hi Jens,
this series removes the revalidate_disk() function, which has been a
really odd duck in the last years. The prime reason why most people
use it is because it propagates a size change from the gendisk to
the block_device structure. But it also calls into the rather ill
defined ->revalidate_disk method which is rather useless for the
callers. So this adds a new helper to just
2010 Sep 28
18
[PATCH] Btrfs: add a disk info ioctl to get the disks attached to a filesystem
This was a request from the systemd guys. They need a quick and easy way to get
all devices attached to a Btrfs filesystem in order to check if any of the disks
are SSD for...something, I didn''t ask :). I''ve tested this with the
btrfs-progs patch that accompanies this patch. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
---
fs/btrfs/ioctl.c | 64
2016 Aug 17
20
[PATCH 00/15] Fix issue with KOBJ_ADD uevent versus disk attributes
This is an attempt to fix the issue that some disks' sysfs attributes are not
ready at the time its KOBJ_ADD event is sent.
The symptom is during device hotplug, udev may fail to find certain attributes,
such as serial or wwn, of the disk. As a result the /dev/disk/by-id entries are
not created.
The cause is device_add_disk emits the uevent before returning, and the callers
have to create
2016 Aug 17
20
[PATCH 00/15] Fix issue with KOBJ_ADD uevent versus disk attributes
This is an attempt to fix the issue that some disks' sysfs attributes are not
ready at the time its KOBJ_ADD event is sent.
The symptom is during device hotplug, udev may fail to find certain attributes,
such as serial or wwn, of the disk. As a result the /dev/disk/by-id entries are
not created.
The cause is device_add_disk emits the uevent before returning, and the callers
have to create
2016 Aug 17
0
[PATCH 15/15] block: Add FIXME comment to handle device_add_disk error
...+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -4028,6 +4028,7 @@ skip_create_disk:
set_capacity(dd->disk, capacity);
/* Enable the block device and add it to /dev */
+ /* FIXME: handle error. */
device_add_disk(&dd->pdev->dev, dd->disk, &mtip_attr_group);
dd->bdev = bdget_disk(dd->disk, 0);
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index c31a7df..e619529 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -1085,6 +1085,7 @@ static int __init nbd_init(void)
disk->private_data = &nbd_dev[i];
sprintf(disk->disk_name, "nbd%d&quo...