block: make large sector size support configurable

Make it so we can turn off LBS support because it's not that stable.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
diff --git a/block/Kconfig b/block/Kconfig
index df8973b..5efcf12 100644
--- a/block/Kconfig
+++ b/block/Kconfig
@@ -36,6 +36,12 @@
 	  created on demand, but scripts that manually create device nodes and
 	  then call losetup might rely on this behavior.
 
+config BLOCK_LBS
+	bool "Large sector size support"
+	default n
+	help
+	  Enable sector sizes larger than the base page size.
+
 config BLK_RQ_ALLOC_TIME
 	bool
 
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 9a1f0ee..1820220 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -272,7 +272,11 @@ static inline dev_t disk_devt(struct gendisk *disk)
  * We should strive for 1 << (PAGE_SHIFT + MAX_PAGECACHE_ORDER)
  * however we constrain this to what we can validate and test.
  */
-#define BLK_MAX_BLOCK_SIZE      SZ_64K
+#ifdef CONFIG_BLOCK_LBS
+# define BLK_MAX_BLOCK_SIZE      SZ_64K
+#else
+# define BLK_MAX_BLOCK_SIZE      PAGE_SIZE
+#endif
 
 /* blk_validate_limits() validates bsize, so drivers don't usually need to */
 static inline int blk_validate_block_size(unsigned long bsize)