*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2015, Intel Corporation.
+ * Copyright (c) 2011, 2016, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
OBD_CONNECT_DIR_STRIPE |
OBD_CONNECT_BULK_MBITS |
OBD_CONNECT_SUBTREE |
- OBD_CONNECT_FLAGS2;
+ OBD_CONNECT_FLAGS2 | OBD_CONNECT_MULTIMODRPCS;
data->ocd_connect_flags2 = 0;
valid != CLIENT_CONNECT_MDT_REQD) {
char *buf;
- OBD_ALLOC_WAIT(buf, PAGE_CACHE_SIZE);
- obd_connect_flags2str(buf, PAGE_CACHE_SIZE,
+ OBD_ALLOC_WAIT(buf, PAGE_SIZE);
+ obd_connect_flags2str(buf, PAGE_SIZE,
valid ^ CLIENT_CONNECT_MDT_REQD, 0, ",");
LCONSOLE_ERROR_MSG(0x170, "Server %s does not support "
"feature(s) needed for correct operation "
"of this client (%s). Please upgrade "
"server or downgrade client.\n",
sbi->ll_md_exp->exp_obd->obd_name, buf);
- OBD_FREE(buf, PAGE_CACHE_SIZE);
+ OBD_FREE(buf, PAGE_SIZE);
GOTO(out_md_fid, err = -EPROTO);
}
}
LASSERT(osfs->os_bsize);
- sb->s_blocksize = osfs->os_bsize;
- sb->s_blocksize_bits = log2(osfs->os_bsize);
- sb->s_magic = LL_SUPER_MAGIC;
- sb->s_maxbytes = MAX_LFS_FILESIZE;
- sbi->ll_namelen = osfs->os_namelen;
+ sb->s_blocksize = osfs->os_bsize;
+ sb->s_blocksize_bits = log2(osfs->os_bsize);
+ sb->s_magic = LL_SUPER_MAGIC;
+ sb->s_maxbytes = MAX_LFS_FILESIZE;
+ sbi->ll_namelen = osfs->os_namelen;
+ sbi->ll_mnt.mnt = current->fs->root.mnt;
if ((sbi->ll_flags & LL_SBI_USER_XATTR) &&
!(data->ocd_connect_flags & OBD_CONNECT_XATTR)) {
sbi->ll_flags |= LL_SBI_64BIT_HASH;
if (data->ocd_connect_flags & OBD_CONNECT_BRW_SIZE)
- sbi->ll_md_brw_pages = data->ocd_brw_size >> PAGE_CACHE_SHIFT;
+ sbi->ll_md_brw_pages = data->ocd_brw_size >> PAGE_SHIFT;
else
sbi->ll_md_brw_pages = 1;
if (sbi->ll_flags & LL_SBI_ALWAYS_PING)
data->ocd_connect_flags &= ~OBD_CONNECT_PINGLESS;
- CDEBUG(D_RPCTRACE, "ocd_connect_flags: "LPX64" ocd_version: %d "
+ CDEBUG(D_RPCTRACE, "ocd_connect_flags: %#llx ocd_version: %d "
"ocd_grant: %d\n", data->ocd_connect_flags,
data->ocd_version, data->ocd_grant);
lli->lli_async_rc = 0;
}
mutex_init(&lli->lli_layout_mutex);
+ memset(lli->lli_jobid, 0, LUSTRE_JOBID_SIZE);
}
static inline int ll_bdi_register(struct backing_dev_info *bdi)
cfg->cfg_instance = sb;
cfg->cfg_uuid = lsi->lsi_llsbi->ll_sb_uuid;
cfg->cfg_callback = class_config_llog_handler;
+ cfg->cfg_sub_clds = CONFIG_SUB_CLIENT;
/* set up client obds */
err = lustre_process_log(sb, profilenm, cfg);
if (err < 0)
* OST maximum object size and number of stripes. This
* needs another check in addition to the VFS check above. */
if (attr->ia_size > ll_file_maxbytes(inode)) {
- CDEBUG(D_INODE,"file "DFID" too large %llu > "LPU64"\n",
+ CDEBUG(D_INODE,"file "DFID" too large %llu > %llu\n",
PFID(&lli->lli_fid), attr->ia_size,
ll_file_maxbytes(inode));
RETURN(-EFBIG);
osfs->os_type = sb->s_magic;
- CDEBUG(D_SUPER, "MDC blocks "LPU64"/"LPU64" objects "LPU64"/"LPU64"\n",
+ CDEBUG(D_SUPER, "MDC blocks %llu/%llu objects %llu/%llu\n",
osfs->os_bavail, osfs->os_blocks, osfs->os_ffree,osfs->os_files);
if (sbi->ll_flags & LL_SBI_LAZYSTATFS)
RETURN(rc);
}
- CDEBUG(D_SUPER, "OSC blocks "LPU64"/"LPU64" objects "LPU64"/"LPU64"\n",
+ CDEBUG(D_SUPER, "OSC blocks %llu/%llu objects %llu/%llu\n",
obd_osfs.os_bavail, obd_osfs.os_blocks, obd_osfs.os_ffree,
obd_osfs.os_files);
__u64 fsid = huge_encode_dev(sb->s_dev);
int rc;
- CDEBUG(D_VFSTRACE, "VFS Op: at "LPU64" jiffies\n", get_jiffies_64());
+ CDEBUG(D_VFSTRACE, "VFS Op: at %llu jiffies\n", get_jiffies_64());
ll_stats_ops_tally(ll_s2sbi(sb), LPROC_LL_STAFS, 1);
/* Some amount of caching on the client is allowed */
if (body->mbo_valid & OBD_MD_FLMTIME) {
if (body->mbo_mtime > LTIME_S(inode->i_mtime)) {
CDEBUG(D_INODE, "setting ino %lu mtime from %lu "
- "to "LPU64"\n", inode->i_ino,
+ "to %llu\n", inode->i_ino,
LTIME_S(inode->i_mtime), body->mbo_mtime);
LTIME_S(inode->i_mtime) = body->mbo_mtime;
}
struct ll_sb_info *sbi = ll_s2sbi(sb);
struct obd_device *obd;
struct obd_ioctl_data *ioc_data;
+ struct l_wait_info lwi;
+ wait_queue_head_t waitq;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op: superblock %p count %d active %d\n", sb,
obd = class_exp2obd(sbi->ll_md_exp);
if (obd == NULL) {
- CERROR("Invalid MDC connection handle "LPX64"\n",
+ CERROR("Invalid MDC connection handle %#llx\n",
sbi->ll_md_exp->exp_handle.h_cookie);
EXIT;
return;
obd = class_exp2obd(sbi->ll_dt_exp);
if (obd == NULL) {
- CERROR("Invalid LOV connection handle "LPX64"\n",
+ CERROR("Invalid LOV connection handle %#llx\n",
sbi->ll_dt_exp->exp_handle.h_cookie);
EXIT;
return;
}
/* 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.
+ * and then continue. For now, we just periodically checking for vfs
+ * to decrement mnt_cnt and hope to finish it within 10sec.
*/
- schedule();
+ init_waitqueue_head(&waitq);
+ lwi = LWI_TIMEOUT_INTERVAL(cfs_time_seconds(10),
+ cfs_time_seconds(1), NULL, NULL);
+ l_wait_event(waitq, may_umount(sbi->ll_mnt.mnt), &lwi);
+
EXIT;
}
op_data->op_fid1 = body->mbo_fid1;
op_data->op_handle = body->mbo_handle;
- op_data->op_mod_time = cfs_time_current_sec();
+ op_data->op_mod_time = ktime_get_real_seconds();
md_close(exp, op_data, NULL, &close_req);
ptlrpc_req_finished(close_req);
ll_finish_md_op_data(op_data);
struct root_squash_info *squash = &sbi->ll_squash;
int i;
bool matched;
- lnet_process_id_t id;
+ struct lnet_process_id id;
/* Update norootsquash flag */
down_write(&squash->rsi_sem);
int rc;
ENTRY;
- rc = linkea_init(ldata);
+ rc = linkea_init_with_rec(ldata);
if (rc < 0)
RETURN(rc);