All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix nvme test
@ 2018-02-26 19:42 Mikulas Patocka
  0 siblings, 0 replies; 2+ messages in thread
From: Mikulas Patocka @ 2018-02-26 19:42 UTC (permalink / raw)
  To: msnizer; +Cc: dm-devel, Alasdair G. Kergon

Hi

The strncmp function should compare 4 bytes.

But I'm wondering what's the purpose of this test at all? bio-based 
interface doesn't support partial completions for any device - so why do 
we need special code path just for nvme and why can't we use it for other 
block devices?

Mikulas


Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

---
 drivers/md/dm-table.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/drivers/md/dm-table.c
===================================================================
--- linux-2.6.orig/drivers/md/dm-table.c	2018-02-24 03:40:18.000000000 +0100
+++ linux-2.6/drivers/md/dm-table.c	2018-02-26 19:36:29.728499000 +0100
@@ -1755,7 +1755,7 @@ static int device_no_partial_completion(
 	char b[BDEVNAME_SIZE];
 
 	/* For now, NVMe devices are the only devices of this class */
-	return (strncmp(bdevname(dev->bdev, b), "nvme", 3) == 0);
+	return (strncmp(bdevname(dev->bdev, b), "nvme", 4) == 0);
 }
 
 static bool dm_table_does_not_support_partial_completion(struct dm_table *t)

^ permalink raw reply	[flat|nested] 2+ messages in thread
* [PATCH] fix nvme test
@ 2018-02-26 20:22 Mikulas Patocka
  0 siblings, 0 replies; 2+ messages in thread
From: Mikulas Patocka @ 2018-02-26 20:22 UTC (permalink / raw)
  To: Mike Snitzer; +Cc: dm-devel, Alasdair G. Kergon

Hi

The strncmp function should compare 4 bytes.

But I'm wondering what's the purpose of this test at all? bio-based 
interface doesn't support partial completions for any device - so why do 
we need special code path just for nvme and why can't we use it for other 
block devices?

Mikulas


Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

---
 drivers/md/dm-table.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/drivers/md/dm-table.c
===================================================================
--- linux-2.6.orig/drivers/md/dm-table.c	2018-02-24 03:40:18.000000000 +0100
+++ linux-2.6/drivers/md/dm-table.c	2018-02-26 19:36:29.728499000 +0100
@@ -1755,7 +1755,7 @@ static int device_no_partial_completion(
 	char b[BDEVNAME_SIZE];
 
 	/* For now, NVMe devices are the only devices of this class */
-	return (strncmp(bdevname(dev->bdev, b), "nvme", 3) == 0);
+	return (strncmp(bdevname(dev->bdev, b), "nvme", 4) == 0);
 }
 
 static bool dm_table_does_not_support_partial_completion(struct dm_table *t)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-02-26 20:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-26 19:42 [PATCH] fix nvme test Mikulas Patocka
2018-02-26 20:22 Mikulas Patocka

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.