From 5ca1a1e01d456c09d11d8a3409a83e055a7974a1 Mon Sep 17 00:00:00 2001 From: Artem Blagodarenko Date: Tue, 22 Dec 2015 12:15:15 +0300 Subject: [PATCH] LU-7592 osd-ldiskfs: increase supported ldiskfs fs size limit Change "force_over_128tb" mount option to "force_over_256tb". Signed-off-by: Alexander Zarochentsev Signed-off-by: Artem Blagodarenko Seagate-bug-id: MRP-2840 Reviewed-by: Artem Blagodarenko Reviewed-by: Alexey Leonidovich Lyashkov Tested-by: Elena V. Gryaznova Change-Id: Ib53c4375a170823997a5a6b9ef6d832e8b3e0c72 Reviewed-on: http://review.whamcloud.com/17702 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/osd-ldiskfs/osd_handler.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c index c3b760c..316429b 100644 --- a/lustre/osd-ldiskfs/osd_handler.c +++ b/lustre/osd-ldiskfs/osd_handler.c @@ -6227,7 +6227,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_128tb = 0; + int rc = 0, force_over_256tb = 0; ENTRY; if (o->od_mnt != NULL) @@ -6251,8 +6251,15 @@ static int osd_mount(const struct lu_env *env, RETURN(-EINVAL); } #endif - if (opts != NULL && strstr(opts, "force_over_128tb") != NULL) - force_over_128tb = 1; + if (opts != NULL && strstr(opts, "force_over_128tb") != NULL) { + CWARN("force_over_128tb option is depricated." + "Filesystems less then 256TB can be created without any" + "force options. Use force_over_256tb option for" + "filesystems greather then 256TB.\n"); + } + + if (opts != NULL && strstr(opts, "force_over_256tb") != NULL) + force_over_256tb = 1; __page = alloc_page(GFP_IOFS); if (__page == NULL) @@ -6271,7 +6278,12 @@ static int osd_mount(const struct lu_env *env, "noextents", /* strip out option we processed in osd */ "bigendian_extents", - "force_over_128tb", +#if LUSTRE_VERSION_CODE >= OBD_OCD_VERSION(3,0,53,0) +#warning "remove force_over_128 option" +#else + "force_over_128tb (deprecated)", +#endif + "force_over_256tb", NULL }; strcat(options, opts); @@ -6317,11 +6329,11 @@ static int osd_mount(const struct lu_env *env, GOTO(out, rc); } - if (ldiskfs_blocks_count(LDISKFS_SB(osd_sb(o))->s_es) > (8ULL << 32) && - force_over_128tb == 0) { + if (ldiskfs_blocks_count(LDISKFS_SB(osd_sb(o))->s_es) > (64ULL << 30) && + force_over_256tb == 0) { CERROR("%s: device %s LDISKFS does not support filesystems " - "greater than 128TB and can cause data corruption. " - "Use \"force_over_128tb\" mount option to override.\n", + "greater than 256TB and can cause data corruption. " + "Use \"force_over_256tb\" mount option to override.\n", name, dev); GOTO(out, rc = -EINVAL); } -- 1.8.3.1