md: deprecate bitmap file support
authorChristoph Hellwig <hch@lst.de>
Thu, 15 Jun 2023 06:48:40 +0000 (08:48 +0200)
committerSong Liu <song@kernel.org>
Thu, 27 Jul 2023 07:13:29 +0000 (00:13 -0700)
The support for bitmaps on files is a very bad idea abusing various kernel
APIs, and fundamentally requires the file to not be on the actual array
without a way to check that this is actually the case.  Add a deprecation
warning to see if we might be able to eventually drop it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20230615064840.629492-12-hch@lst.de
drivers/md/Kconfig
drivers/md/md.c

index 9712ab9..444517d 100644 (file)
@@ -51,7 +51,7 @@ config MD_AUTODETECT
          If unsure, say Y.
 
 config MD_BITMAP_FILE
-       bool "MD bitmap file support"
+       bool "MD bitmap file support (deprecated)"
        default y
        help
          If you say Y here, support for write intent bitmaps in files on an
index f46996a..f8774b1 100644 (file)
@@ -7049,6 +7049,8 @@ static int set_bitmap_file(struct mddev *mddev, int fd)
                                mdname(mddev));
                        return -EINVAL;
                }
+               pr_warn("%s: using deprecated bitmap file support\n",
+                       mdname(mddev));
 
                f = fget(fd);