aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Hellwig <[email protected]>2023-06-15 08:48:40 +0200
committerSong Liu <[email protected]>2023-07-27 00:13:29 -0700
commit0ae1c9d38426737c39085f919b9b27d2eab3802e (patch)
tree9ec937786b5204538f0f6a91d87199f6819fff27
parenta34d4ef82c3c4bd8bda817e9fb53ef37c5595ddd (diff)
md: deprecate bitmap file support
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 <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Song Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected]
-rw-r--r--drivers/md/Kconfig2
-rw-r--r--drivers/md/md.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig
index 9712ab9bcba5..444517d1a233 100644
--- a/drivers/md/Kconfig
+++ b/drivers/md/Kconfig
@@ -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
diff --git a/drivers/md/md.c b/drivers/md/md.c
index f46996a95b0c..f8774b1ef0aa 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -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);