diff for duplicates of <1493671519.2665.15.camel@sandisk.com> diff --git a/a/1.txt b/N1/1.txt index b11ba2a..a8a4799 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,21 +1,25 @@ On Wed, 2017-04-05 at 19:21 +0200, Christoph Hellwig wrote: -> Now that we use the proper REQ_OP_WRITE_ZEROES operation everywhere we can +> Now that we use the proper REQ_OP_WRITE_ZEROES operation everywhere we ca= +n > kill this hack. -> +>=20 > Signed-off-by: Christoph Hellwig <hch@lst.de> > Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> > Reviewed-by: Hannes Reinecke <hare@suse.com> > [ ... ] -> diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c +> diff --git a/drivers/target/target_core_device.c b/drivers/target/target_= +core_device.c > index c754ae33bf7b..d2f089cfa9ae 100644 > --- a/drivers/target/target_core_device.c > +++ b/drivers/target/target_core_device.c -> @@ -851,7 +851,7 @@ bool target_configure_unmap_from_queue(struct se_dev_attrib *attrib, -> attrib->unmap_granularity = q->limits.discard_granularity / block_size; -> attrib->unmap_granularity_alignment = q->limits.discard_alignment / +> @@ -851,7 +851,7 @@ bool target_configure_unmap_from_queue(struct se_dev_= +attrib *attrib, +> attrib->unmap_granularity =3D q->limits.discard_granularity / block_siz= +e; +> attrib->unmap_granularity_alignment =3D q->limits.discard_alignment / > block_size; -> - attrib->unmap_zeroes_data = q->limits.discard_zeroes_data; -> + attrib->unmap_zeroes_data = 0; +> - attrib->unmap_zeroes_data =3D q->limits.discard_zeroes_data; +> + attrib->unmap_zeroes_data =3D 0; > return true; > } > EXPORT_SYMBOL(target_configure_unmap_from_queue); @@ -28,11 +32,12 @@ this patch the LBPRZ flag was reported correctly to initiator systems through the thin provisioning VPD. With this patch applied that flag will always be reported as zero, forcing initiators to submit WRITE commands with zeroed data buffers instead of submitting the SCSI UNMAP -command to block devices for which discard_zeroes_data was set. From +command to block devices for which=A0discard_zeroes_data was set. From target_core_spc.c: /* Thin Provisioning VPD */ -static sense_reason_t spc_emulate_evpd_b2(struct se_cmd *cmd, unsigned char *buf) +static sense_reason_t spc_emulate_evpd_b2(struct se_cmd *cmd, unsigned char= + *buf) { [ ... ] /* @@ -42,10 +47,10 @@ static sense_reason_t spc_emulate_evpd_b2(struct se_cmd *cmd, unsigned char *buf * will return zeroes after an UNMAP or WRITE SAME (16) to an LBA * See sbc4r36 6.6.4. */ - if (((dev->dev_attrib.emulate_tpu != 0) || - (dev->dev_attrib.emulate_tpws != 0)) && - (dev->dev_attrib.unmap_zeroes_data != 0)) - buf[5] |= 0x04; + if (((dev->dev_attrib.emulate_tpu !=3D 0) || + =A0=A0=A0=A0=A0(dev->dev_attrib.emulate_tpws !=3D 0)) && + =A0=A0=A0=A0=A0(dev->dev_attrib.unmap_zeroes_data !=3D 0)) + buf[5] |=3D 0x04; [ ... ] } @@ -53,4 +58,4 @@ Please advise how to proceed. Thanks, -Bart. +Bart.= diff --git a/a/content_digest b/N1/content_digest index e840c49..ca94aa2 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -20,23 +20,27 @@ "\00:1\0" "b\0" "On Wed, 2017-04-05 at 19:21 +0200, Christoph Hellwig wrote:\n" - "> Now that we use the proper REQ_OP_WRITE_ZEROES operation everywhere we can\n" + "> Now that we use the proper REQ_OP_WRITE_ZEROES operation everywhere we ca=\n" + "n\n" "> kill this hack.\n" - "> \n" + ">=20\n" "> Signed-off-by: Christoph Hellwig <hch@lst.de>\n" "> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>\n" "> Reviewed-by: Hannes Reinecke <hare@suse.com>\n" "> [ ... ]\n" - "> diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c\n" + "> diff --git a/drivers/target/target_core_device.c b/drivers/target/target_=\n" + "core_device.c\n" "> index c754ae33bf7b..d2f089cfa9ae 100644\n" "> --- a/drivers/target/target_core_device.c\n" "> +++ b/drivers/target/target_core_device.c\n" - "> @@ -851,7 +851,7 @@ bool target_configure_unmap_from_queue(struct se_dev_attrib *attrib,\n" - "> \tattrib->unmap_granularity = q->limits.discard_granularity / block_size;\n" - "> \tattrib->unmap_granularity_alignment = q->limits.discard_alignment /\n" + "> @@ -851,7 +851,7 @@ bool target_configure_unmap_from_queue(struct se_dev_=\n" + "attrib *attrib,\n" + "> \tattrib->unmap_granularity =3D q->limits.discard_granularity / block_siz=\n" + "e;\n" + "> \tattrib->unmap_granularity_alignment =3D q->limits.discard_alignment /\n" "> \t\t\t\t\t\t\t\tblock_size;\n" - "> -\tattrib->unmap_zeroes_data = q->limits.discard_zeroes_data;\n" - "> +\tattrib->unmap_zeroes_data = 0;\n" + "> -\tattrib->unmap_zeroes_data =3D q->limits.discard_zeroes_data;\n" + "> +\tattrib->unmap_zeroes_data =3D 0;\n" "> \treturn true;\n" "> }\n" "> EXPORT_SYMBOL(target_configure_unmap_from_queue);\n" @@ -49,11 +53,12 @@ "through the thin provisioning VPD. With this patch applied that flag\n" "will always be reported as zero, forcing initiators to submit WRITE\n" "commands with zeroed data buffers instead of submitting the SCSI UNMAP\n" - "command to block devices for which\302\240discard_zeroes_data was set. From\n" + "command to block devices for which=A0discard_zeroes_data was set. From\n" "target_core_spc.c:\n" "\n" "/* Thin Provisioning VPD */\n" - "static sense_reason_t spc_emulate_evpd_b2(struct se_cmd *cmd, unsigned char *buf)\n" + "static sense_reason_t spc_emulate_evpd_b2(struct se_cmd *cmd, unsigned char=\n" + " *buf)\n" "{\n" "\t[ ... ]\n" "\t/*\n" @@ -63,10 +68,10 @@ "\t * will return zeroes after an UNMAP or WRITE SAME (16) to an LBA\n" "\t * See sbc4r36 6.6.4.\n" "\t */\n" - "\tif (((dev->dev_attrib.emulate_tpu != 0) ||\n" - "\t\302\240\302\240\302\240\302\240\302\240(dev->dev_attrib.emulate_tpws != 0)) &&\n" - "\t\302\240\302\240\302\240\302\240\302\240(dev->dev_attrib.unmap_zeroes_data != 0))\n" - "\t\tbuf[5] |= 0x04;\n" + "\tif (((dev->dev_attrib.emulate_tpu !=3D 0) ||\n" + "\t=A0=A0=A0=A0=A0(dev->dev_attrib.emulate_tpws !=3D 0)) &&\n" + "\t=A0=A0=A0=A0=A0(dev->dev_attrib.unmap_zeroes_data !=3D 0))\n" + "\t\tbuf[5] |=3D 0x04;\n" "\t[ ... ]\n" "}\n" "\n" @@ -74,6 +79,6 @@ "\n" "Thanks,\n" "\n" - Bart. + Bart.= -2467f2b55ecc72807cdc3e1f2915e216d502d81d4f1ad4ca16d268486353fcff +860187d6f310cc19acdc59d1e7bba40a4da3ca2e240d2f6f3b92a463fe84e5e6
diff --git a/a/content_digest b/N2/content_digest index e840c49..59b6b50 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -1,7 +1,7 @@ "ref\020170405172125.22600-1-hch@lst.de\0" "ref\020170405172125.22600-26-hch@lst.de\0" "From\0Bart Van Assche <Bart.VanAssche@sandisk.com>\0" - "Subject\0Re: [PATCH 25/27] block: remove the discard_zeroes_data flag\0" + "Subject\0Re: [Drbd-dev] [PATCH 25/27] block: remove the discard_zeroes_data flag\0" "Date\0Mon, 1 May 2017 20:45:21 +0000\0" "To\0agk@redhat.com <agk@redhat.com>" lars.ellenberg@linbit.com <lars.ellenberg@linbit.com> @@ -11,12 +11,12 @@ philipp.reisner@linbit.com <philipp.reisner@linbit.com> axboe@kernel.dk <axboe@kernel.dk> " shli@kernel.org <shli@kernel.org>\0" - "Cc\0linux-scsi@vger.kernel.org <linux-scsi@vger.kernel.org>" - dm-devel@redhat.com <dm-devel@redhat.com> - drbd-dev@lists.linbit.com <drbd-dev@lists.linbit.com> + "Cc\0linux-raid@vger.kernel.org <linux-raid@vger.kernel.org>" + linux-scsi@vger.kernel.org <linux-scsi@vger.kernel.org> linux-block@vger.kernel.org <linux-block@vger.kernel.org> + dm-devel@redhat.com <dm-devel@redhat.com> target-devel@vger.kernel.org <target-devel@vger.kernel.org> - " linux-raid@vger.kernel.org <linux-raid@vger.kernel.org>\0" + " drbd-dev@lists.linbit.com <drbd-dev@lists.linbit.com>\0" "\00:1\0" "b\0" "On Wed, 2017-04-05 at 19:21 +0200, Christoph Hellwig wrote:\n" @@ -76,4 +76,4 @@ "\n" Bart. -2467f2b55ecc72807cdc3e1f2915e216d502d81d4f1ad4ca16d268486353fcff +2381d7c327318994b1b3baaf5ad3592fd46322cc950d2b8420267706be61f7e1
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.