Whamcloud - gitweb
LU-7592 osd-ldiskfs: increase supported ldiskfs fs size limit 02/17702/7
authorArtem Blagodarenko <artem.blagodarenko@seagate.com>
Tue, 22 Dec 2015 09:15:15 +0000 (12:15 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 22 Apr 2016 15:47:14 +0000 (15:47 +0000)
Change "force_over_128tb" mount option to "force_over_256tb".

Signed-off-by: Alexander Zarochentsev <alexander.zarochentsev@seagate.com>
Signed-off-by: Artem Blagodarenko <artem.blagodarenko@seagate.com>
Seagate-bug-id: MRP-2840
Reviewed-by: Artem Blagodarenko <artem.blagodarenko@seagate.com>
Reviewed-by: Alexey Leonidovich Lyashkov <alexey.lyashkov@seagate.com>
Tested-by: Elena V. Gryaznova <elena.gryaznova@seagate.com>
Change-Id: Ib53c4375a170823997a5a6b9ef6d832e8b3e0c72
Reviewed-on: http://review.whamcloud.com/17702
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osd-ldiskfs/osd_handler.c

index c3b760c..316429b 100644 (file)
@@ -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;
        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)
         ENTRY;
 
        if (o->od_mnt != NULL)
@@ -6251,8 +6251,15 @@ static int osd_mount(const struct lu_env *env,
                RETURN(-EINVAL);
        }
 #endif
                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)
 
        __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",
                        "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);
                        NULL
                };
                strcat(options, opts);
@@ -6317,11 +6329,11 @@ static int osd_mount(const struct lu_env *env,
                GOTO(out, rc);
        }
 
                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 "
                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);
        }
                       name, dev);
                GOTO(out, rc = -EINVAL);
        }