mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2026-01-27 12:47:24 +01:00
btrfs: add back warning for mount option commit values exceeding 300
The Btrfs documentation states that if the commit value is greater than
300 a warning should be issued. The warning was accidentally lost in the
new mount API update.
Fixes: 6941823cc8 ("btrfs: remove old mount API code")
CC: stable@vger.kernel.org # 6.12+
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Kyoji Ogasawara <sawara04.o@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
a0fd1c6098
commit
4ce2affc6e
|
|
@ -300,6 +300,7 @@ enum {
|
|||
#define BTRFS_FEATURE_INCOMPAT_SAFE_CLEAR 0ULL
|
||||
|
||||
#define BTRFS_DEFAULT_COMMIT_INTERVAL (30)
|
||||
#define BTRFS_WARNING_COMMIT_INTERVAL (300)
|
||||
#define BTRFS_DEFAULT_MAX_INLINE (2048)
|
||||
|
||||
struct btrfs_dev_replace {
|
||||
|
|
|
|||
|
|
@ -569,6 +569,10 @@ static int btrfs_parse_param(struct fs_context *fc, struct fs_parameter *param)
|
|||
break;
|
||||
case Opt_commit_interval:
|
||||
ctx->commit_interval = result.uint_32;
|
||||
if (ctx->commit_interval > BTRFS_WARNING_COMMIT_INTERVAL) {
|
||||
btrfs_warn(NULL, "excessive commit interval %u, use with care",
|
||||
ctx->commit_interval);
|
||||
}
|
||||
if (ctx->commit_interval == 0)
|
||||
ctx->commit_interval = BTRFS_DEFAULT_COMMIT_INTERVAL;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user