From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin K. Petersen" Subject: Re: [PATCH 22/25] block: stop using discards for zeroing Date: Wed, 05 Apr 2017 07:55:39 -0400 Message-ID: References: <20170331163313.31821-1-hch@lst.de> <20170331163313.31821-23-hch@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20170331163313.31821-23-hch-jcswGhMUV9g@public.gmane.org> (Christoph Hellwig's message of "Fri, 31 Mar 2017 18:33:10 +0200") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: drbd-dev-bounces-cunTk1MwBs8qoQakbn7OcQ@public.gmane.org Errors-To: drbd-dev-bounces-cunTk1MwBs8qoQakbn7OcQ@public.gmane.org To: Christoph Hellwig Cc: axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org, linux-raid-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, martin.petersen-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org, snitzer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, philipp.reisner-63ez5xqkn6DQT0dZR+AlfA@public.gmane.org, linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, dm-devel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, lars.ellenberg-63ez5xqkn6DQT0dZR+AlfA@public.gmane.org, shli-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, agk-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, drbd-dev-cunTk1MwBs8qoQakbn7OcQ@public.gmane.org List-Id: dm-devel.ids Christoph Hellwig writes: > Now that we have REQ_OP_WRITE_ZEROES implemented for all devices that > support efficient zeroing of devices we can remove the call to s/of devices/ > blkdev_issue_discard. This means we only have two ways of zeroing > left and can simply the code. simplify > + * Note that this function may fail with -EOPNOTSUPP if the driver supports > + * efficient zeroing operation, but the device capabilities can only be > + * discovered by trial and error. In this case the caller should call the > + * function again, and it will use the fallback path. Maybe: "Note that this function may fail with -EOPNOTSUPP if the driver signals zeroing offload support but the device fails to process the command (for some devices there is no non-destructive way to verify whether this operation is actually supported). If -EOPNOTSUPP is returned, the caller should retry the blkdev_issue_zeroout() and the fallback path will be used." Otherwise OK. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: To: Christoph Hellwig Cc: axboe@kernel.dk, martin.petersen@oracle.com, agk@redhat.com, snitzer@redhat.com, shli@kernel.org, philipp.reisner@linbit.com, lars.ellenberg@linbit.com, linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, drbd-dev@lists.linbit.com, dm-devel@redhat.com, linux-raid@vger.kernel.org Subject: Re: [PATCH 22/25] block: stop using discards for zeroing From: "Martin K. Petersen" References: <20170331163313.31821-1-hch@lst.de> <20170331163313.31821-23-hch@lst.de> Date: Wed, 05 Apr 2017 07:55:39 -0400 In-Reply-To: <20170331163313.31821-23-hch@lst.de> (Christoph Hellwig's message of "Fri, 31 Mar 2017 18:33:10 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain List-ID: Christoph Hellwig writes: > Now that we have REQ_OP_WRITE_ZEROES implemented for all devices that > support efficient zeroing of devices we can remove the call to s/of devices/ > blkdev_issue_discard. This means we only have two ways of zeroing > left and can simply the code. simplify > + * Note that this function may fail with -EOPNOTSUPP if the driver supports > + * efficient zeroing operation, but the device capabilities can only be > + * discovered by trial and error. In this case the caller should call the > + * function again, and it will use the fallback path. Maybe: "Note that this function may fail with -EOPNOTSUPP if the driver signals zeroing offload support but the device fails to process the command (for some devices there is no non-destructive way to verify whether this operation is actually supported). If -EOPNOTSUPP is returned, the caller should retry the blkdev_issue_zeroout() and the fallback path will be used." Otherwise OK. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69]) by mail09.linbit.com (LINBIT Mail Daemon) with ESMTP id 8F9B0105648F for ; Wed, 5 Apr 2017 13:55:49 +0200 (CEST) To: Christoph Hellwig From: "Martin K. Petersen" References: <20170331163313.31821-1-hch@lst.de> <20170331163313.31821-23-hch@lst.de> Date: Wed, 05 Apr 2017 07:55:39 -0400 In-Reply-To: <20170331163313.31821-23-hch@lst.de> (Christoph Hellwig's message of "Fri, 31 Mar 2017 18:33:10 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain Cc: axboe@kernel.dk, linux-raid@vger.kernel.org, martin.petersen@oracle.com, snitzer@redhat.com, philipp.reisner@linbit.com, linux-block@vger.kernel.org, dm-devel@redhat.com, linux-scsi@vger.kernel.org, lars.ellenberg@linbit.com, shli@kernel.org, agk@redhat.com, drbd-dev@lists.linbit.com Subject: Re: [Drbd-dev] [PATCH 22/25] block: stop using discards for zeroing List-Id: "*Coordination* of development, patches, contributions -- *Questions* \(even to developers\) go to drbd-user, please." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Christoph Hellwig writes: > Now that we have REQ_OP_WRITE_ZEROES implemented for all devices that > support efficient zeroing of devices we can remove the call to s/of devices/ > blkdev_issue_discard. This means we only have two ways of zeroing > left and can simply the code. simplify > + * Note that this function may fail with -EOPNOTSUPP if the driver supports > + * efficient zeroing operation, but the device capabilities can only be > + * discovered by trial and error. In this case the caller should call the > + * function again, and it will use the fallback path. Maybe: "Note that this function may fail with -EOPNOTSUPP if the driver signals zeroing offload support but the device fails to process the command (for some devices there is no non-destructive way to verify whether this operation is actually supported). If -EOPNOTSUPP is returned, the caller should retry the blkdev_issue_zeroout() and the fallback path will be used." Otherwise OK. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering