* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2012, Intel Corporation.
+ * Copyright (c) 2011, 2013, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
lru_page_max = (pages / 4) * 3;
}
- /* initialize ll_cache data */
+ /* initialize lru data */
cfs_atomic_set(&sbi->ll_cache.ccc_users, 0);
sbi->ll_cache.ccc_lru_max = lru_page_max;
cfs_atomic_set(&sbi->ll_cache.ccc_lru_left, lru_page_max);
spin_lock_init(&sbi->ll_cache.ccc_lru_lock);
CFS_INIT_LIST_HEAD(&sbi->ll_cache.ccc_lru);
- cfs_atomic_set(&sbi->ll_cache.ccc_unstable_nr, 0);
- cfs_waitq_init(&sbi->ll_cache.ccc_unstable_waitq);
-
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;
LASSERT(fid_is_sane(&sbi->ll_root_fid));
root = ll_iget(sb, cl_fid_build_ino(&sbi->ll_root_fid,
- ll_need_32bit_api(sbi)),
+ sbi->ll_flags & LL_SBI_32BIT_API),
&lmd);
md_free_lustre_md(sbi->ll_md_exp, &lmd);
ptlrpc_req_finished(request);
/* we need restore s_dev from changed for clustred NFS before put_super
* because new kernels have cached s_dev and change sb->s_dev in
* put_super not affected real removing devices */
- if (sbi)
- sb->s_dev = sbi->ll_sdev_orig;
- EXIT;
+ if (sbi) {
+ sb->s_dev = sbi->ll_sdev_orig;
+ sbi->ll_umounting = 1;
+ }
+ EXIT;
}
char *ll_read_opt(const char *opt, char *data)
struct lustre_sb_info *lsi = s2lsi(sb);
struct ll_sb_info *sbi = ll_s2sbi(sb);
char *profilenm = get_profile_name(sb);
- int ccc_count, next, force = 1, rc = 0;
+ int force = 1, next;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op: sb %p - %s\n", sb, profilenm);
force = obd->obd_force;
}
- /* Wait for unstable pages to be committed to stable storage */
- if (force == 0) {
- struct l_wait_info lwi = LWI_INTR(LWI_ON_SIGNAL_NOOP, NULL);
- rc = l_wait_event(sbi->ll_cache.ccc_unstable_waitq,
- cfs_atomic_read(&sbi->ll_cache.ccc_unstable_nr) == 0,
- &lwi);
- }
-
- ccc_count = cfs_atomic_read(&sbi->ll_cache.ccc_unstable_nr);
- if (force == 0 && rc != -EINTR)
- LASSERTF(ccc_count == 0, "count: %i\n", ccc_count);
-
-
/* We need to set force before the lov_disconnect in
lustre_common_put_super, since l_d cleans up osc's as well. */
if (force) {
spin_unlock(&lli->lli_lock);
}
#endif
- inode->i_ino = cl_fid_build_ino(&body->fid1, ll_need_32bit_api(sbi));
+ inode->i_ino = cl_fid_build_ino(&body->fid1,
+ sbi->ll_flags & LL_SBI_32BIT_API);
inode->i_generation = cl_fid_build_gen(&body->fid1);
if (body->valid & OBD_MD_FLATIME) {
if (S_ISREG(inode->i_mode) && lli->lli_clob != NULL)
/* discard all dirty pages before truncating them, required by
* osc_extent implementation at LU-1030. */
- cl_sync_file_range(inode, 0, OBD_OBJECT_EOF, CL_FSYNC_DISCARD);
+ cl_sync_file_range(inode, 0, OBD_OBJECT_EOF,
+ CL_FSYNC_DISCARD, 1);
truncate_inode_pages(&inode->i_data, 0);
OBD_FREE_PTR(ioc_data);
}
-
/* Really, we'd like to wait until there are no requests outstanding,
* and then continue. For now, we just invalidate the requests,
* schedule() and sleep one second if needed, and hope.
LASSERT(fid_is_sane(&md.body->fid1));
*inode = ll_iget(sb, cl_fid_build_ino(&md.body->fid1,
- ll_need_32bit_api(sbi)),
+ sbi->ll_flags & LL_SBI_32BIT_API),
&md);
if (*inode == NULL || IS_ERR(*inode)) {
#ifdef CONFIG_FS_POSIX_ACL