Re: [dm-devel] [PATCH 00/10] Fix confusion around MAX_ORDER

2023-09-28 Thread Paolo Bonzini
On 9/28/23 09:50, Mikulas Patocka wrote: Fix the bugs and then change the definition of MAX_ORDER to be inclusive: the range of orders user can ask from buddy allocator is 0..MAX_ORDER now. I think that exclusive MAX_ORDER is more intuitive in the C language - i.e. if you write "for (i = 0; i <

Re: [dm-devel] [PATCH 00/10] Fix confusion around MAX_ORDER

2023-09-27 Thread Paolo Bonzini
On 3/15/23 12:31, Kirill A. Shutemov wrote: MAX_ORDER currently defined as number of orders page allocator supports: user can ask buddy allocator for page order between 0 and MAX_ORDER-1. This definition is counter-intuitive and lead to number of bugs all over the kernel. Fix the bugs and then

Re: [dm-devel] [PATCH v4 1/3] scsi: scsi_ioctl: export __scsi_result_to_blk_status()

2021-07-06 Thread Paolo Bonzini
On 01/07/21 08:19, Christoph Hellwig wrote: http://git.infradead.org/users/hch/block.git/shortlog/refs/heads/scsi-ioctl But more importantly, dm has no business interpreting the errors. Just like how SG_IO processing generally does not look at the error and just returns it to userspace and leav

Re: [dm-devel] [PATCH v5 3/3] dm mpath: add CONFIG_DM_MULTIPATH_SG_IO - failover for SG_IO

2021-07-06 Thread Paolo Bonzini
On 05/07/21 15:48, Martin Wilck wrote: On Mo, 2021-07-05 at 15:11 +0200, Hannes Reinecke wrote: On 7/5/21 3:02 PM, Paolo Bonzini wrote: On 02/07/21 16:21, Martin Wilck wrote: SG_IO gives you raw access to the SCSI logic unit, and you get to keep the pieces if anything goes wrong. That

Re: [dm-devel] [PATCH v5 3/3] dm mpath: add CONFIG_DM_MULTIPATH_SG_IO - failover for SG_IO

2021-07-05 Thread Paolo Bonzini
On 02/07/21 16:21, Martin Wilck wrote: SG_IO gives you raw access to the SCSI logic unit, and you get to keep the pieces if anything goes wrong. That's a very fragile user space API, on the fringe of being useless IMO. Indeed. If SG_IO is for raw access to an ITL nexus, it shouldn't be suppo

Re: [dm-devel] [PATCH v5 3/3] dm mpath: add CONFIG_DM_MULTIPATH_SG_IO - failover for SG_IO

2021-07-01 Thread Paolo Bonzini
On Thu, Jul 1, 2021 at 9:56 AM Christoph Hellwig wrote: > On Mon, Jun 28, 2021 at 05:15:58PM +0200, mwi...@suse.com wrote: > > The qemu "pr-helper" was specifically invented for it. I > > believe that this is the most important real-world scenario for sending > > SG_IO ioctls to device-mapper devi

Re: [dm-devel] dm: dm_blk_ioctl(): implement failover for SG_IO on dm-multipath

2021-04-29 Thread Paolo Bonzini
On 29/04/21 10:33, Martin Wilck wrote: On Wed, 2021-04-28 at 15:54 -0400, Mike Snitzer wrote: @@ -626,32 +626,16 @@ static int dm_sg_io_ioctl(struct block_device *bdev, fmode_t mode, } if (rhdr.info & SG_INFO_CHECK) { -   /* -   

Re: [dm-devel] [PATCH 23/24] virtio-blk: remove a spurious call to revalidate_disk_size

2020-11-08 Thread Paolo Bonzini
On 06/11/20 20:03, Christoph Hellwig wrote: revalidate_disk_size just updates the block device size from the disk size. Thus calling it from revalidate_disk_size doesn't actually do s/revalidate_disk_size/virtblk_update_cache_mode/ anything. -- dm-devel mailing list dm-devel@redhat.com htt

Re: [dm-devel] [PATCH 0/2] scsi: core: regression fixes for request batching

2019-08-07 Thread Paolo Bonzini
feature. > > Steffen Maier (2): > scsi: core: fix missing .cleanup_rq for SCSI hosts without request > batching > scsi: core: fix dh and multipathing for SCSI hosts without request > batching > > drivers/scsi/scsi_lib.c | 4 +++- > 1 file changed, 3 insertions

Re: [dm-devel] [PATCH 26/27] scsi: sd: Separate zeroout and discard command choices

2017-04-19 Thread Paolo Bonzini
On 05/04/2017 19:21, Christoph Hellwig wrote: > +static ssize_t > +zeroing_mode_store(struct device *dev, struct device_attribute *attr, > +const char *buf, size_t count) > +{ > + struct scsi_disk *sdkp = to_scsi_disk(dev); > + > + if (!capable(CAP_SYS_ADMIN)) > +

Re: [dm-devel] [PATCH 03/23] sd: implement REQ_OP_WRITE_ZEROES

2017-03-29 Thread Paolo Bonzini
On 29/03/2017 18:28, Bart Van Assche wrote: > On Wed, 2017-03-29 at 16:51 +0200, Paolo Bonzini wrote: >> On 28/03/2017 20:50, Bart Van Assche wrote: >>> This means that just like the start and end of a discard must be aligned on >>> a >>> discard_granularit

Re: [dm-devel] [PATCH 03/23] sd: implement REQ_OP_WRITE_ZEROES

2017-03-29 Thread Paolo Bonzini
On 28/03/2017 20:50, Bart Van Assche wrote: > > This means that just like the start and end of a discard must be aligned on a > discard_granularity boundary, WRITE SAME commands with the UNMAP bit set must > also respect that granularity. I think this means that either > __blkdev_issue_zeroout()

Re: [dm-devel] [PATCH 12/23] sd: handle REQ_UNMAP

2017-03-29 Thread Paolo Bonzini
On 28/03/2017 18:48, Bart Van Assche wrote: >> +if (rq->cmd_flags & REQ_UNMAP) { >> +switch (sdkp->provisioning_mode) { >> +case SD_LBP_WS16: >> +return sd_setup_write_same16_cmnd(cmd, true); >> +case SD_LBP_WS10: >> +

Re: [dm-devel] RFC: always use REQ_OP_WRITE_ZEROES for zeroing offload

2017-03-29 Thread Paolo Bonzini
On 23/03/2017 23:53, Lars Ellenberg wrote: > Thin does not claim to zero data on discard. which is ok, and correct, > because it only punches holes on full chunks (or whatever you call > them), and leaves the rest in the mapping tree as is. > > And that behaviour would prevent DRBD from exposin

Re: [dm-devel] [PATCH 23/23] block: remove the discard_zeroes_data flag

2017-03-29 Thread Paolo Bonzini
On 28/03/2017 19:00, Bart Van Assche wrote: > On Thu, 2017-03-23 at 10:33 -0400, Christoph Hellwig wrote: >> Now that we use the proper REQ_OP_WRITE_ZEROES operation everywhere we can >> kill this hack. >> >> [ ... ] >> >> diff --git a/Documentation/ABI/testing/sysfs-block >> b/Documentation/ABI

Re: [dm-devel] [PATCH v3] dm: don't allow ioctls to targets that don't map to whole devices

2017-02-03 Thread Paolo Bonzini
s: sending ioctl %x to DM device without required privilege.\n", > + current->comm, cmd); > + r = -ENOIOCTLCMD; > goto out; > + } > } > > r = __blkdev_driver_ioctl(bdev, mode, cmd, arg); > Acked-by: Paolo Bonzini Thanks, Paolo -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] linux-next: Tree for Feb 2 (drivers/md/dm.c)

2017-02-02 Thread Paolo Bonzini
On 02/02/2017 10:44, Christoph Hellwig wrote: > ec8013bedd ("dm: do not forward ioctls from logical volumes to the > underlying device"), > > The trivial fix would be to add a select of the SCSI_REQUEST symbol > to dm, but my gut feeling teels me the call is simply wrong, and > should be removed