From cae8d0e7120a356e0218783e0678d405306b5da4 Mon Sep 17 00:00:00 2001 From: Artem Blagodarenko Date: Thu, 7 Nov 2019 18:56:26 +0300 Subject: [PATCH] LU-12950 osd-ldiskfs: increase supported size to 1024tb Currently attempts of creating ldisk file system with size >512TB finished with message: LDISKFS-fs does not support file systems greater than 512TB and can cause data corruption. Use "force_over_512tb" mount option to override. Change "force_over_512tb" mount option to "force_over_1024tb" as testing for these large filesystems have not shown any serious functional problems (though there are performance issues to address). Test-Parameters: trivial fstype=ldiskfs testlist=conf-sanity Signed-off-by: Artem Blagodarenko Cray-bug-id: lus-6815 Change-Id: I0f84fe85aaab05ab0bafa5f0e6074e1690d79899 Reviewed-on: https://review.whamcloud.com/36705 Reviewed-by: Andreas Dilger Tested-by: jenkins Tested-by: Maloo Reviewed-by: Wang Shilong --- lustre/osd-ldiskfs/osd_handler.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c index f9c29ff..24ca88c 100644 --- a/lustre/osd-ldiskfs/osd_handler.c +++ b/lustre/osd-ldiskfs/osd_handler.c @@ -7549,7 +7549,7 @@ static int osd_mount(const struct lu_env *env, struct osd_thread_info *info = osd_oti_get(env); struct lu_fid *fid = &info->oti_fid; struct inode *inode; - int rc = 0, force_over_512tb = 0; + int rc = 0, force_over_1024tb = 0; ENTRY; @@ -7576,23 +7576,22 @@ static int osd_mount(const struct lu_env *env, #endif #if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(3, 0, 53, 0) if (opts != NULL && strstr(opts, "force_over_128tb") != NULL) { - CWARN("force_over_128tb option is deprecated. " - "Filesystems less than 512TB can be created without any " - "force options. Use force_over_512tb option for " - "filesystems greater than 512TB.\n"); + CWARN("force_over_128tb option is deprecated. Filesystems smaller than 1024TB can be created without any force option. Use force_over_1024tb option for filesystems larger than 1024TB.\n"); } #endif #if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(3, 1, 53, 0) if (opts != NULL && strstr(opts, "force_over_256tb") != NULL) { - CWARN("force_over_256tb option is deprecated. " - "Filesystems less than 512TB can be created without any " - "force options. Use force_over_512tb option for " - "filesystems greater than 512TB.\n"); + CWARN("force_over_256tb option is deprecated. Filesystems smaller than 1024TB can be created without any force options. Use force_over_1024tb option for filesystems larger than 1024TB.\n"); + } +#endif +#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(3, 2, 53, 0) + if (opts != NULL && strstr(opts, "force_over_512tb") != NULL) { + CWARN("force_over_512tb option is deprecated. Filesystems smaller than 1024TB can be created without any force options. Use force_over_1024tb option for filesystems larger than 1024TB.\n"); } #endif - if (opts != NULL && strstr(opts, "force_over_512tb") != NULL) - force_over_512tb = 1; + if (opts != NULL && strstr(opts, "force_over_1024tb") != NULL) + force_over_1024tb = 1; __page = alloc_page(GFP_KERNEL); if (__page == NULL) @@ -7614,6 +7613,7 @@ static int osd_mount(const struct lu_env *env, "force_over_128tb", "force_over_256tb", "force_over_512tb", + "force_over_1024tb", NULL }; strncat(options, opts, PAGE_SIZE); @@ -7661,11 +7661,9 @@ static int osd_mount(const struct lu_env *env, } if (ldiskfs_blocks_count(LDISKFS_SB(osd_sb(o))->s_es) << - osd_sb(o)->s_blocksize_bits > 512ULL << 40 && - force_over_512tb == 0) { - CERROR("%s: device %s LDISKFS does not support filesystems " - "greater than 512TB and can cause data corruption. " - "Use \"force_over_512tb\" mount option to override.\n", + osd_sb(o)->s_blocksize_bits > 1024ULL << 40 && + force_over_1024tb == 0) { + CERROR("%s: device %s LDISKFS has not been tested on filesystems larger than 1024TB and may cause data corruption. Use 'force_over_1024tb' mount option to override.\n", name, dev); GOTO(out_mnt, rc = -EINVAL); } -- 1.8.3.1