Re: [dm-devel] remove REQ_OP_WRITE_SAME v2

2022-02-27 Thread Martin K. Petersen
On Wed, 9 Feb 2022 09:28:21 +0100, Christoph Hellwig wrote:

> Now that we are using REQ_OP_WRITE_ZEROES for all zeroing needs in the
> kernel there is very little use left for REQ_OP_WRITE_SAME.  We only
> have two callers left, and both just export optional protocol features
> to remote systems: DRBD and the target code.
> 
> For the target code the only real use case was zeroing offload, which
> is kept with this series, and for DRBD I suspect the same based on the
> usage.
> 
> [...]

Applied to 5.18/scsi-queue, thanks!

[1/7] cxlflash: query write_zeroes limit for zeroing
  https://git.kernel.org/mkp/scsi/c/898cd34607eb
[2/7] drbd: drop REQ_OP_WRITE_SAME support
  https://git.kernel.org/mkp/scsi/c/a34592ff6b78
[3/7] rnbd: drop WRITE_SAME support
  https://git.kernel.org/mkp/scsi/c/ebd04737637b
[4/7] sd: remove write same support
  https://git.kernel.org/mkp/scsi/c/e383e16e84e9
[5/7] md: drop WRITE_SAME support
  https://git.kernel.org/mkp/scsi/c/10fa225c33a9
[6/7] dm: remove write same support
  https://git.kernel.org/mkp/scsi/c/a773187e37fa
[7/7] block: remove REQ_OP_WRITE_SAME support
  https://git.kernel.org/mkp/scsi/c/73bd66d9c834

-- 
Martin K. Petersen  Oracle Linux Engineering

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel



Re: [dm-devel] remove REQ_OP_WRITE_SAME v2

2022-02-19 Thread Martin K. Petersen


Christoph,

> Now that we are using REQ_OP_WRITE_ZEROES for all zeroing needs in the
> kernel there is very little use left for REQ_OP_WRITE_SAME.  We only
> have two callers left, and both just export optional protocol features
> to remote systems: DRBD and the target code.

Applied to 5.18/scsi-staging, thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel



Re: [dm-devel] remove REQ_OP_WRITE_SAME v2

2022-02-16 Thread Christoph Hellwig
On Wed, Feb 16, 2022 at 08:07:56PM -0700, Jens Axboe wrote:
> Let's just use the SCSI tree - I didn't check if it throws any conflicts
> right now, so probably something to check upfront...

There is a minor conflict because the __blkdev_issue_write_same
function removed by this series is affected by the blk_next_bio calling
convention change in the block tree, but the fixup is trivial.

Martin: do you want to fix that up when applying, or do you want me
to resend?  If you have your discard rework ready you can also send
that now and I'll rebase on top of that.

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel



Re: [dm-devel] remove REQ_OP_WRITE_SAME v2

2022-02-16 Thread Jens Axboe
On 2/9/22 10:51 PM, Christoph Hellwig wrote:
> On Wed, Feb 09, 2022 at 01:00:26PM -0500, Martin K. Petersen wrote:
>>
>> Christoph,
>>
>>> Now that we are using REQ_OP_WRITE_ZEROES for all zeroing needs in the
>>> kernel there is very little use left for REQ_OP_WRITE_SAME.  We only
>>> have two callers left, and both just export optional protocol features
>>> to remote systems: DRBD and the target code.
>>
>> No particular objections from me. I had a half-baked series to do the
>> same thing.
>>
>> One thing I would like is to either pull this series through SCSI or do
>> the block pieces in a post merge branch because I'm about to post my
>> discard/zeroing rework and that's going to clash with your changes.
> 
> I'd be fine with taking this through the SCSI tree.  Or we can wait
> another merge window to make your life easier.

Let's just use the SCSI tree - I didn't check if it throws any conflicts
right now, so probably something to check upfront...

If things pan out, you can add my Acked-by to the series.

-- 
Jens Axboe

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel



Re: [dm-devel] remove REQ_OP_WRITE_SAME v2

2022-02-09 Thread Christoph Hellwig
On Wed, Feb 09, 2022 at 01:00:26PM -0500, Martin K. Petersen wrote:
> 
> Christoph,
> 
> > Now that we are using REQ_OP_WRITE_ZEROES for all zeroing needs in the
> > kernel there is very little use left for REQ_OP_WRITE_SAME.  We only
> > have two callers left, and both just export optional protocol features
> > to remote systems: DRBD and the target code.
> 
> No particular objections from me. I had a half-baked series to do the
> same thing.
> 
> One thing I would like is to either pull this series through SCSI or do
> the block pieces in a post merge branch because I'm about to post my
> discard/zeroing rework and that's going to clash with your changes.

I'd be fine with taking this through the SCSI tree.  Or we can wait
another merge window to make your life easier.

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel



Re: [dm-devel] remove REQ_OP_WRITE_SAME v2

2022-02-09 Thread Martin K. Petersen


Christoph,

> Now that we are using REQ_OP_WRITE_ZEROES for all zeroing needs in the
> kernel there is very little use left for REQ_OP_WRITE_SAME.  We only
> have two callers left, and both just export optional protocol features
> to remote systems: DRBD and the target code.

No particular objections from me. I had a half-baked series to do the
same thing.

One thing I would like is to either pull this series through SCSI or do
the block pieces in a post merge branch because I'm about to post my
discard/zeroing rework and that's going to clash with your changes.

-- 
Martin K. Petersen  Oracle Linux Engineering

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel



[dm-devel] remove REQ_OP_WRITE_SAME v2

2022-02-09 Thread Christoph Hellwig
Now that we are using REQ_OP_WRITE_ZEROES for all zeroing needs in the
kernel there is very little use left for REQ_OP_WRITE_SAME.  We only
have two callers left, and both just export optional protocol features
to remote systems: DRBD and the target code.

For the target code the only real use case was zeroing offload, which
is kept with this series, and for DRBD I suspect the same based on the
usage.

git://git.infradead.org/users/hch/block.git delete-write-same

Gitweb:


http://git.infradead.org/users/hch/block.git/shortlog/refs/heads/delete-write-same

Changes since v2:
 - split up
 - rebased ontop of five years of kernel change, including the totally
   pointless addition of REQ_OP_WRITE_SAME in rnbd

Changes from RFC:
 - add zeroing offload for the SCSI target.

Diffstat:
 block/blk-core.c   |   13 -
 block/blk-lib.c|   91 -
 block/blk-merge.c  |   40 
 block/blk-settings.c   |   16 --
 block/blk-sysfs.c  |8 ---
 block/blk-zoned.c  |1 
 block/blk.h|1 
 block/bounce.c |3 -
 drivers/block/drbd/drbd_main.c |   31 +---
 drivers/block/drbd/drbd_nl.c   |   72 -
 drivers/block/drbd/drbd_receiver.c |   47 ++-
 drivers/block/drbd/drbd_req.c  |1 
 drivers/block/drbd/drbd_worker.c   |5 --
 drivers/block/rnbd/rnbd-clt.c  |7 --
 drivers/block/rnbd/rnbd-clt.h  |1 
 drivers/block/rnbd/rnbd-proto.h|6 --
 drivers/block/rnbd/rnbd-srv.c  |3 -
 drivers/md/dm-core.h   |1 
 drivers/md/dm-crypt.c  |1 
 drivers/md/dm-ebs-target.c |1 
 drivers/md/dm-io.c |   22 
 drivers/md/dm-linear.c |1 
 drivers/md/dm-mpath.c  |1 
 drivers/md/dm-rq.c |3 -
 drivers/md/dm-stripe.c |4 -
 drivers/md/dm-table.c  |   29 ---
 drivers/md/dm-zone.c   |4 -
 drivers/md/dm.c|   15 --
 drivers/md/md-linear.c |1 
 drivers/md/md-multipath.c  |1 
 drivers/md/md.h|7 --
 drivers/md/raid0.c |2 
 drivers/md/raid1.c |4 -
 drivers/md/raid10.c|1 
 drivers/md/raid5.c |1 
 drivers/scsi/cxlflash/vlun.c   |4 -
 drivers/scsi/sd.c  |   75 ++
 drivers/scsi/sd_zbc.c  |2 
 include/linux/bio.h|3 -
 include/linux/blk_types.h  |2 
 include/linux/blkdev.h |   19 ---
 include/linux/device-mapper.h  |6 --
 kernel/trace/blktrace.c|1 
 43 files changed, 30 insertions(+), 527 deletions(-)

--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel



Re: [dm-devel] remove REQ_OP_WRITE_SAME

2017-05-08 Thread Martin K. Petersen

Christoph,

> Any chance to get a sneak preview of that work?

I have been on the road since LSF/MM and just got back home. I'll make
it a priority.

-- 
Martin K. Petersen  Oracle Linux Engineering

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


Re: [dm-devel] remove REQ_OP_WRITE_SAME

2017-05-05 Thread Christoph Hellwig
On Thu, Apr 13, 2017 at 10:23:10PM -0400, Martin K. Petersen wrote:
> The other thing that keeps me a bit on the fence is that a bunch of the
> plumbing to handle a bio with a payload different from bi_size is needed
> for the copy offload token. I'm hoping to have those patches ready for
> 4.13. Right now there are a bunch of places where handling of
> REQ_OP_COPY_IN and REQ_OP_COPY_OUT share conditionals with WRITE SAME.

Any chance to get a sneak preview of that work?

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


Re: [dm-devel] remove REQ_OP_WRITE_SAME

2017-04-13 Thread Martin K. Petersen

Christoph,

> Now that we are using REQ_OP_WRITE_ZEROES for all zeroing needs in the
> kernel there is very little use left for REQ_OP_WRITE_SAME.  We only
> have two callers left, and both just export optional protocol features
> to remote systems: DRBD and the target code.

While I'm not particularly married to WRITE SAME, I do think it's a
shame that the RAID5/6 code never started using it. It does make a
difference when initializing RAID sets.

The other thing that keeps me a bit on the fence is that a bunch of the
plumbing to handle a bio with a payload different from bi_size is needed
for the copy offload token. I'm hoping to have those patches ready for
4.13. Right now there are a bunch of places where handling of
REQ_OP_COPY_IN and REQ_OP_COPY_OUT share conditionals with WRITE SAME.

So I suggest postponing the decision about whether to rip out WRITE SAME
until I finish the token stuff.

-- 
Martin K. Petersen  Oracle Linux Engineering

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


[dm-devel] remove REQ_OP_WRITE_SAME

2017-04-12 Thread Christoph Hellwig
Now that we are using REQ_OP_WRITE_ZEROES for all zeroing needs in the
kernel there is very little use left for REQ_OP_WRITE_SAME.  We only
have two callers left, and both just export optional protocol features
to remote systems: DRBD and the target code.

For the target code the only real use case was zeroing offload, which
is kept with this series, and for DRBD I suspect the same based on the
usage.

git://git.infradead.org/users/hch/block.git delete-write-same

Gitweb:


http://git.infradead.org/users/hch/block.git/shortlog/refs/heads/delete-write-same

Changes from RFC:
 - add zeroing offload for the SCSI target.

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel