X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fosd-ldiskfs%2Fosd_handler.c;h=316429bb5dde24fe950f1bbf2aa02d79154827ea;hp=d7dbdcbe490b259059905d60207a0a63fa169b77;hb=5ca1a1e01d456c09d11d8a3409a83e055a7974a1;hpb=a19c1ea92fb8d9909ec9fb98f22a8a9e4835c572 diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c index d7dbdcb..316429b 100644 --- a/lustre/osd-ldiskfs/osd_handler.c +++ b/lustre/osd-ldiskfs/osd_handler.c @@ -83,12 +83,12 @@ #include int ldiskfs_pdo = 1; -CFS_MODULE_PARM(ldiskfs_pdo, "i", int, 0644, - "ldiskfs with parallel directory operations"); +module_param(ldiskfs_pdo, int, 0644); +MODULE_PARM_DESC(ldiskfs_pdo, "ldiskfs with parallel directory operations"); int ldiskfs_track_declares_assert; -CFS_MODULE_PARM(ldiskfs_track_declares_assert, "i", int, 0644, - "LBUG during tracking of declares"); +module_param(ldiskfs_track_declares_assert, int, 0644); +MODULE_PARM_DESC(ldiskfs_track_declares_assert, "LBUG during tracking of declares"); /* Slab to allocate dynlocks */ struct kmem_cache *dynlock_cachep; @@ -1325,16 +1325,13 @@ static int osd_trans_start(const struct lu_env *env, struct dt_device *d, static unsigned long last_printed; static int last_credits; - CWARN("%.16s: too many transaction credits (%d > %d)\n", - LDISKFS_SB(osd_sb(dev))->s_es->s_volume_name, - oh->ot_credits, - osd_journal(dev)->j_max_transaction_buffers); - - osd_trans_dump_creds(env, th); - + /* don't make noise on a tiny testing systems + * actual credits misuse will be caught anyway */ if (last_credits != oh->ot_credits && time_after(jiffies, last_printed + - msecs_to_jiffies(60 * MSEC_PER_SEC))) { + msecs_to_jiffies(60 * MSEC_PER_SEC)) && + osd_transaction_size(dev) > 512) { + osd_trans_dump_creds(env, th); libcfs_debug_dumpstack(NULL); last_credits = oh->ot_credits; last_printed = jiffies; @@ -5275,11 +5272,17 @@ struct osd_filldir_cbs { * \retval 0 on success * \retval 1 on buffer full */ +#ifdef HAVE_FILLDIR_USE_CTX +static int osd_ldiskfs_filldir(struct dir_context *buf, + const char *name, int namelen, +#else static int osd_ldiskfs_filldir(void *buf, const char *name, int namelen, +#endif loff_t offset, __u64 ino, unsigned d_type) { - struct osd_it_ea *it = ((struct osd_filldir_cbs *)buf)->it; + struct osd_it_ea *it = + ((struct osd_filldir_cbs *)buf)->it; struct osd_object *obj = it->oie_obj; struct osd_it_ea_dirent *ent = it->oie_dirent; struct lu_fid *fid = &ent->oied_fid; @@ -6224,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) @@ -6248,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) @@ -6268,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); @@ -6314,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); }