Message ID | 20230615064840.629492-12-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [01/11] md-bitmap: set BITMAP_WRITE_ERROR in write_sb_page | expand |
On 6/15/23 08:48, Christoph Hellwig wrote: > 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> > --- > drivers/md/Kconfig | 2 +- > drivers/md/md.c | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) > Reviewed-by: Hannes Reinecke <hare@suse.de> Cheers, Hannes
> On Jun 14, 2023, at 11:48 PM, Christoph Hellwig <hch@lst.de> wrote: > > 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> > --- > drivers/md/Kconfig | 2 +- > drivers/md/md.c | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig > index 9712ab9bcba52e..444517d1a2336a 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 c9fcefaf9c073b..d04a91295edf9d 100644 > --- a/drivers/md/md.c > +++ b/drivers/md/md.c > @@ -7026,6 +7026,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); > > -- > 2.39.2 > Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig index 9712ab9bcba52e..444517d1a2336a 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 c9fcefaf9c073b..d04a91295edf9d 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -7026,6 +7026,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);
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> --- drivers/md/Kconfig | 2 +- drivers/md/md.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)