]> Git Repo - J-linux.git/commitdiff
scsi: core: don't preallocate small SGL in case of NO_SG_CHAIN
authorMing Lei <[email protected]>
Thu, 6 Jun 2019 08:34:09 +0000 (16:34 +0800)
committerMartin K. Petersen <[email protected]>
Thu, 20 Jun 2019 19:22:57 +0000 (15:22 -0400)
The preallocated small SGL depends on SG_CHAIN so if the ARCH doesn't
support SG_CHAIN, preallocation of small SGL can't work at all.

Fix this issue by not using small preallocation in case of NO_SG_CHAIN.

Cc: Christoph Hellwig <[email protected]>
Cc: Bart Van Assche <[email protected]>
Cc: Ewan D. Milne <[email protected]>
Cc: Hannes Reinecke <[email protected]>
Cc: Guenter Roeck <[email protected]>
Reported-by: Guenter Roeck <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Bart Van Assche <[email protected]>
Tested-by: Guenter Roeck <[email protected]>
Signed-off-by: Ming Lei <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
drivers/scsi/scsi_lib.c

index 45b43e97505c1c05afeb3167e9e5b8b9a4eb056a..30cbea57ea086b22fa045a2c3ddae5292af71f07 100644 (file)
  * Size of integrity metadata is usually small, 1 inline sg should
  * cover normal cases.
  */
+#ifdef CONFIG_ARCH_NO_SG_CHAIN
+#define  SCSI_INLINE_PROT_SG_CNT  0
+#define  SCSI_INLINE_SG_CNT  0
+#else
 #define  SCSI_INLINE_PROT_SG_CNT  1
-
 #define  SCSI_INLINE_SG_CNT  2
+#endif
 
 static struct kmem_cache *scsi_sdb_cache;
 static struct kmem_cache *scsi_sense_cache;
This page took 0.054218 seconds and 4 git commands to generate.