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

2017-04-19 Thread Martin K. Petersen
Paolo, > Should this be conditional on lbprz, lbpws, lbpws10 and max_ws_blocks? It is intentional that things can be overridden from userland for devices that report the "wrong" thing. We do the same for discard so people can set up udev rules. -- Martin K. Petersen Oracle Linux

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 26/27] scsi: sd: Separate zeroout and discard command choices

2017-04-06 Thread Hannes Reinecke
On 04/05/2017 07:21 PM, Christoph Hellwig wrote: > From: "Martin K. Petersen" > > Now that zeroout and discards are distinct operations we need to > separate the policy of choosing the appropriate command. Create a > zeroing_mode which can be one of: > > write: