Skip to contentSkip to conversation

xen/blkfront: fix comment for need_copy

PATCH Applied Dongli Zhang 5 participants 5 messages Mar 17, 2022 – Mar 21, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/blkfront: fix comment for need_copy

The 'need_copy' is set when rq_data_dir(req) returns WRITE, in order to copy the written data to persistent page.

".need_copy = rq_data_dir(req) && info->feature_persistent,"

---
 drivers/block/xen-blkfront.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/xen-blkfront.c +1 -1
index 03b5fb341e58..dbc32d0a4b1a 100644
@@ -576,7 +576,7 @@ struct setup_rw_req {
 	struct blkif_request *ring_req;
 	grant_ref_t gref_head;
 	unsigned int id;
-	/* Only used when persistent grant is used and it's a read request */
+	/* Only used when persistent grant is used and it's a write request */
 	bool need_copy;
 	unsigned int bvec_off;
 	char *bvec_data;
Signature · 1 line
2.17.1
Acked-by on v1 1/1
#2 lore raw
In reply to Dongli Zhang
Quoted 4 lines · Dongli Zhang

The 'need_copy' is set when rq_data_dir(req) returns WRITE, in order to copy the written data to persistent page.

".need_copy = rq_data_dir(req) && info->feature_persistent,"

I would also add:

Fixes c004a6fe0c40 ('block/xen-blkfront: Make it running on 64KB page granularity')
Quoted 1 line

Albeit I have one nit since you are already changing the line.

Quoted 9 lines
---
 drivers/block/xen-blkfront.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/xen-blkfront.c +0 -0
index 03b5fb341e58..dbc32d0a4b1a 100644

drivers/block/xen-blkfront.c struct setup_rw_req { · line 579

Quoted 5 lines
drivers/block/xen-blkfront.c +1 -1
@@ -576,7 +576,7 @@ struct setup_rw_req {
 	struct blkif_request *ring_req;
 	grant_ref_t gref_head;
 	unsigned int id;
-	/* Only used when persistent grant is used and it's a read request */
+	/* Only used when persistent grant is used and it's a write request */

While there you might want to adjust the comment to:

"... persistent grants are used ..."

Thanks, Roger.

maintainer
#3 lore raw
Quoted 9 lines · Roger Pau Monné
Quoted 4 lines · Dongli Zhang

The 'need_copy' is set when rq_data_dir(req) returns WRITE, in order to copy the written data to persistent page.

".need_copy = rq_data_dir(req) && info->feature_persistent,"

I would also add:

Fixes c004a6fe0c40 ('block/xen-blkfront: Make it running on 64KB page granularity')

Hmm, a "Fixes:" tag for a change in a comment?

This might generate additional work e.g. for downstreams (we at SUSE have scripts checking "Fixes:" tags and require such changes to be applied to kernels having the fixed patch applied).

That said I'd prefer not having a "Fixes:" tag for such changes, but maybe this is just due to the fact that it would be me having to apply this patch to the SUSE kernels...

Juergen

maintainer Applied
#4 lore raw
In reply to Dongli Zhang
Quoted 6 lines · Dongli Zhang

The 'need_copy' is set when rq_data_dir(req) returns WRITE, in order to copy the written data to persistent page.

".need_copy = rq_data_dir(req) && info->feature_persistent,"

Applied, thanks!

[1/1] xen/blkfront: fix comment for need_copy

      commit: 08719dd9176b4c55f547bd11812fd6cc35907d37

Best regards,

Signature · 1 line
Jens Axboe