search for: sdkp

Displaying 14 results from an estimated 14 matches for "sdkp".

Did you mean: sdk
2015 Mar 13
0
[PATCH] sd, mmc, virtio_blk, string_helpers: fix block size units
...> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c > index 6b78476..3c7fe4e 100644 > --- a/drivers/scsi/sd.c > +++ b/drivers/scsi/sd.c > @@ -2235,11 +2235,11 @@ got_data: > > { > char cap_str_2[10], cap_str_10[10]; > - u64 sz = (u64)sdkp->capacity << ilog2(sector_size); > > - string_get_size(sz, STRING_UNITS_2, cap_str_2, > - sizeof(cap_str_2)); > - string_get_size(sz, STRING_UNITS_10, cap_str_10, > + string_get_size(sdkp->capacity, s...
2015 Mar 13
0
[PATCH] sd, mmc, virtio_blk, string_helpers: fix block size units
...> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c > index 6b78476..3c7fe4e 100644 > --- a/drivers/scsi/sd.c > +++ b/drivers/scsi/sd.c > @@ -2235,11 +2235,11 @@ got_data: > > { > char cap_str_2[10], cap_str_10[10]; > - u64 sz = (u64)sdkp->capacity << ilog2(sector_size); > > - string_get_size(sz, STRING_UNITS_2, cap_str_2, > - sizeof(cap_str_2)); > - string_get_size(sz, STRING_UNITS_10, cap_str_10, > + string_get_size(sdkp->capacity, s...
2019 Dec 11
0
[PATCH 15/24] compat_ioctl: scsi: move ioctl handling into drivers
...subsystem. **/ -static int sd_ioctl(struct block_device *bdev, fmode_t mode, - unsigned int cmd, unsigned long arg) +static int sd_ioctl_common(struct block_device *bdev, fmode_t mode, + unsigned int cmd, void __user *p) { struct gendisk *disk = bdev->bd_disk; struct scsi_disk *sdkp = scsi_disk(disk); struct scsi_device *sdp = sdkp->device; - void __user *p = (void __user *)arg; int error; SCSI_LOG_IOCTL(1, sd_printk(KERN_INFO, sdkp, "sd_ioctl: disk=%s, " @@ -1507,9 +1506,6 @@ static int sd_ioctl(struct block_device *bdev, fmode_t mode, break; d...
2019 Dec 11
3
[PATCH 00/24] block, scsi: final compat_ioctl cleanup
Hi Jens, James and Martin, This series concludes the work I did for linux-5.5 on the compat_ioctl() cleanup, killing off fs/compat_ioctl.c and block/compat_ioctl.c by moving everything into drivers. Overall this would be a reduction both in complexity and line count, but as I'm also adding documentation the overall number of lines increases in the end. My plan was originally to keep the
2020 Jan 02
1
[PATCH v3 13/22] compat_ioctl: scsi: move ioctl handling into drivers
...subsystem. **/ -static int sd_ioctl(struct block_device *bdev, fmode_t mode, - unsigned int cmd, unsigned long arg) +static int sd_ioctl_common(struct block_device *bdev, fmode_t mode, + unsigned int cmd, void __user *p) { struct gendisk *disk = bdev->bd_disk; struct scsi_disk *sdkp = scsi_disk(disk); struct scsi_device *sdp = sdkp->device; - void __user *p = (void __user *)arg; int error; SCSI_LOG_IOCTL(1, sd_printk(KERN_INFO, sdkp, "sd_ioctl: disk=%s, " @@ -1507,9 +1506,6 @@ static int sd_ioctl(struct block_device *bdev, fmode_t mode, break; d...
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
2020 Jul 21
0
[PATCH 09/10] block: scsi: sd: use blk_is_valid_logical_block_size
...changed, 1 insertion(+), 4 deletions(-) > > > > diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c > > index d90fefffe31b7..f012e7397b058 100644 > > --- a/drivers/scsi/sd.c > > +++ b/drivers/scsi/sd.c > > @@ -2520,10 +2520,7 @@ sd_read_capacity(struct scsi_disk *sdkp, > > unsigned char *buffer) > > "assuming 512.\n"); > > } > > > > - if (sector_size != 512 && > > - sector_size != 1024 && > > - sector_size != 2048 && > > - sector_size != 4096) { > > + if...
2016 Aug 17
0
[PATCH 15/15] block: Add FIXME comment to handle device_add_disk error
...s/scsi/sd.c index eb8e67f..bd4862d 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -3000,6 +3000,7 @@ static void sd_probe_async(void *data, async_cookie_t cookie) } blk_pm_runtime_init(sdp->request_queue, dev); + /* FIXME: handle error. */ device_add_disk(dev, gd, NULL); if (sdkp->capacity) sd_dif_config_host(sdkp); diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index e9619a6..5b869da 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -729,6 +729,7 @@ static int sr_probe(struct device *dev) dev_set_drvdata(dev, cd); disk->flags |= GENHD_FL_REMOVABL...
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
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
2020 Jul 21
17
[PATCH 00/10] RFC: move logical block size checking to the block core
This patch series aims to move the logical block size checking to the block code. This was inspired by missing check for valid logical block size in virtio-blk which causes the kernel to crash in a weird way later on when it is invalid. I added blk_is_valid_logical_block_size which returns true iff the block size is one of supported sizes. I added this check to virtio-blk, and also converted
2020 Jul 21
17
[PATCH 00/10] RFC: move logical block size checking to the block core
This patch series aims to move the logical block size checking to the block code. This was inspired by missing check for valid logical block size in virtio-blk which causes the kernel to crash in a weird way later on when it is invalid. I added blk_is_valid_logical_block_size which returns true iff the block size is one of supported sizes. I added this check to virtio-blk, and also converted