sbi->ll_async_page_max = (pages / 4) * 3;
}
- sbi->ll_ra_info.ra_max_pages = min(pages / 32,
+ sbi->ll_ra_info.ra_max_pages_per_file = min(pages / 32,
SBI_DEFAULT_READAHEAD_MAX);
+ sbi->ll_ra_info.ra_max_pages = sbi->ll_ra_info.ra_max_pages_per_file;
sbi->ll_ra_info.ra_max_read_ahead_whole_pages =
SBI_DEFAULT_READAHEAD_WHOLE_MAX;
INIT_LIST_HEAD(&sbi->ll_conn_chain);
#ifdef DCACHE_LUSTRE_INVALID
.d_compare = ll_dcompare,
#endif
+ .d_revalidate = ll_revalidate_nd,
};
static int client_common_fill_super(struct super_block *sb, char *md, char *dt)
struct obd_capa *oc = NULL;
struct obd_statfs osfs;
struct ptlrpc_request *request = NULL;
- struct lustre_handle dt_conn = {0, };
- struct lustre_handle md_conn = {0, };
struct obd_connect_data *data = NULL;
struct obd_uuid *uuid;
struct lustre_md lmd;
OBD_CONNECT_VERSION | OBD_CONNECT_MDS_CAPA |
OBD_CONNECT_OSS_CAPA | OBD_CONNECT_CANCELSET|
OBD_CONNECT_FID | OBD_CONNECT_AT |
- OBD_CONNECT_LOV_V3 | OBD_CONNECT_RMT_CLIENT;
+ OBD_CONNECT_LOV_V3 | OBD_CONNECT_RMT_CLIENT |
+ OBD_CONNECT_VBR | OBD_CONNECT_SOM;
#ifdef HAVE_LRU_RESIZE_SUPPORT
if (sbi->ll_flags & LL_SBI_LRU_RESIZE)
if (sbi->ll_flags & LL_SBI_RMT_CLIENT)
data->ocd_connect_flags |= OBD_CONNECT_RMT_CLIENT_FORCE;
- err = obd_connect(NULL, &md_conn, obd, &sbi->ll_sb_uuid, data, NULL);
+ err = obd_connect(NULL, &sbi->ll_md_exp, obd, &sbi->ll_sb_uuid, data, NULL);
if (err == -EBUSY) {
LCONSOLE_ERROR_MSG(0x14f, "An MDT (md %s) is performing "
"recovery, of which this client is not a "
CERROR("cannot connect to %s: rc = %d\n", md, err);
GOTO(out, err);
}
- sbi->ll_md_exp = class_conn2export(&md_conn);
err = obd_fid_init(sbi->ll_md_exp);
if (err) {
OBD_CONNECT_CANCELSET | OBD_CONNECT_FID |
OBD_CONNECT_SRVLOCK | OBD_CONNECT_TRUNCLOCK|
OBD_CONNECT_AT | OBD_CONNECT_RMT_CLIENT |
- OBD_CONNECT_OSS_CAPA;
+ OBD_CONNECT_OSS_CAPA | OBD_CONNECT_VBR|
+ OBD_CONNECT_SOM;
if (!OBD_FAIL_CHECK(OBD_FAIL_OSC_CONNECT_CKSUM)) {
/* OBD_CONNECT_CKSUM should always be set, even if checksums are
obd->obd_upcall.onu_upcall = cl_ocd_update;
data->ocd_brw_size = PTLRPC_MAX_BRW_PAGES << CFS_PAGE_SHIFT;
- err = obd_connect(NULL, &dt_conn, obd, &sbi->ll_sb_uuid, data, NULL);
+ err = obd_connect(NULL, &sbi->ll_dt_exp, obd, &sbi->ll_sb_uuid, data, NULL);
if (err == -EBUSY) {
LCONSOLE_ERROR_MSG(0x150, "An OST (dt %s) is performing "
"recovery, of which this client is not a "
GOTO(out_md_fid, err);
}
- sbi->ll_dt_exp = class_conn2export(&dt_conn);
-
err = obd_fid_init(sbi->ll_dt_exp);
if (err) {
CERROR("Can't init data layer FID infrastructure, "
ll_close_thread_shutdown(sbi->ll_lcq);
+ cl_sb_fini(sb);
+
/* destroy inodes in deathrow */
prune_deathrow(sbi, 0);
*flags &= ~tmp;
goto next;
}
+ tmp = ll_set_opt("lazystatfs", s1, LL_SBI_LAZYSTATFS);
+ if (tmp) {
+ *flags |= tmp;
+ goto next;
+ }
+ tmp = ll_set_opt("nolazystatfs", s1, LL_SBI_LAZYSTATFS);
+ if (tmp) {
+ *flags &= ~tmp;
+ goto next;
+ }
LCONSOLE_ERROR_MSG(0x152, "Unknown option '%s', won't mount.\n",
s1);
lli->lli_flags = 0;
lli->lli_maxbytes = PAGE_CACHE_MAXBYTES;
spin_lock_init(&lli->lli_lock);
- INIT_LIST_HEAD(&lli->lli_pending_write_llaps);
INIT_LIST_HEAD(&lli->lli_close_list);
lli->lli_inode_magic = LLI_INODE_MAGIC;
sema_init(&lli->lli_och_sem, 1);
}
}
- cl_sb_fini(sb);
-
if (sbi->ll_lcq) {
/* Only if client_common_fill_super succeeded */
client_common_put_super(sb);
}
+
next = 0;
while ((obd = class_devices_in_group(&sbi->ll_sb_uuid, &next)) !=NULL) {
class_manual_cleanup(obd);
lustre_common_put_super(sb);
cl_env_cache_purge(~0);
- lu_context_keys_dump();
LCONSOLE_WARN("client %s umount complete\n", ll_instance);
if (rc == -EAGAIN) {
/* MDS has instructed us to obtain Size-on-MDS attribute
* from OSTs and send setattr to back to MDS. */
- rc = ll_sizeonmds_update(inode, mod, &op_data->op_handle,
+ rc = ll_sizeonmds_update(inode, &op_data->op_handle,
op_data->op_ioepoch);
} else if (rc) {
CERROR("inode %lu mdc truncate failed: rc = %d\n",
if (rc)
GOTO(out, rc);
- if (op_data->op_ioepoch)
- CDEBUG(D_INODE, "Epoch "LPU64" opened on "DFID" for "
- "truncate\n", op_data->op_ioepoch, PFID(&lli->lli_fid));
-
+ ll_ioepoch_open(lli, op_data->op_ioepoch);
if (!lsm || !S_ISREG(inode->i_mode)) {
CDEBUG(D_INODE, "no lsm: not setting attrs on OST\n");
GOTO(out, rc = 0);
CDEBUG(D_SUPER, "MDC blocks "LPU64"/"LPU64" objects "LPU64"/"LPU64"\n",
osfs->os_bavail, osfs->os_blocks, osfs->os_ffree,osfs->os_files);
+ if (sbi->ll_flags & LL_SBI_LAZYSTATFS)
+ flags |= OBD_STATFS_NODELAY;
+
rc = obd_statfs_rqset(class_exp2obd(sbi->ll_dt_exp),
&obd_osfs, max_age, flags);
if (rc) {
LASSERT(fid_seq(&lli->lli_fid) != 0);
if (body->valid & OBD_MD_FLSIZE) {
- if ((ll_i2mdexp(inode)->exp_connect_flags & OBD_CONNECT_SOM) &&
+ if (exp_connect_som(ll_i2mdexp(inode)) &&
S_ISREG(inode->i_mode) && lli->lli_smd) {
struct lustre_handle lockh;
ldlm_mode_t mode;
rc = class_process_proc_param(PARAM_LLITE, lvars.obd_vars,
lcfg, sb);
if (rc > 0)
- rc = 0;
+ rc = 0;
return(rc);
}
if (sbi->ll_flags & LL_SBI_ACL)
seq_puts(seq, ",acl");
+ if (sbi->ll_flags & LL_SBI_LAZYSTATFS)
+ seq_puts(seq, ",lazystatfs");
+
RETURN(0);
}