int count, int *eof, void *data);
extern int lprocfs_rd_conn_uuid(char *page, char **start, off_t off,
int count, int *eof, void *data);
+extern int lprocfs_rd_connect_flags(char *page, char **start, off_t off,
+ int count, int *eof, void *data);
extern int lprocfs_rd_num_exports(char *page, char **start, off_t off,
int count, int *eof, void *data);
extern int lprocfs_rd_numrefs(char *page, char **start, off_t off,
static inline int lprocfs_rd_conn_uuid(char *page, char **start, off_t off,
int count, int *eof, void *data)
{ return 0; }
+static inline int lprocfs_rd_connect_flags(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
+{ return 0; }
+
static inline int lprocfs_rd_num_exports(char *page, char **start, off_t off,
int count, int *eof, void *data)
{ return 0; }
#define OBD_CONNECT_REQPORTAL 0x40ULL /* Separate portal for non-IO reqs */
#define OBD_CONNECT_ACL 0x80ULL /* client using access control lists */
#define OBD_CONNECT_XATTR 0x100ULL /* client using extended attributes*/
-
-
#define OBD_CONNECT_CROW 0x200ULL /* MDS+OST do object create-on-write */
#define OBD_CONNECT_TRUNCLOCK 0x400ULL /* server gets locks for punch b=9528 */
#define OBD_CONNECT_TRANSNO 0x800ULL /* replay is sending initial transno */
#define OBD_CONNECT_IBITS 0x1000ULL /* support for inodebits locks */
#define OBD_CONNECT_JOIN 0x2000ULL /* files can be concatenated */
+/* also update obd_connect_names[] for lprocfs_rd_connect_flags() */
#define MDS_CONNECT_SUPPORTED (OBD_CONNECT_RDONLY | OBD_CONNECT_VERSION | \
OBD_CONNECT_ACL | OBD_CONNECT_XATTR | \
for (i = 0; i < MAXQUOTAS; i++) {
struct list_head id_list;
struct dquot_id *dqid, *tmp;
-
+
if (!Q_TYPESET(oqc, i))
continue;
-
+
if (qctxt->qckt_first_check[i])
continue;
-
+
dummy->qi_files[i] = dqopt->files[i];
LASSERT(dummy->qi_files[i] != NULL);
INIT_LIST_HEAD(&id_list);
-
+
rc = lustre_get_qids(dummy, i, &id_list);
if (rc) {
CERROR("read old limits failed. (rc:%d)\n", rc);
}
list_for_each_entry_safe(dqid, tmp, &id_list, di_link) {
list_del_init(&dqid->di_link);
-
+
cqget(sb, qctxt->qckt_hash, &qctxt->qckt_list,
dqid->di_id, i, qctxt->qckt_first_check[i]);
kfree(dqid);
static struct lprocfs_vars lprocfs_obd_vars[] = {
{ "uuid", lprocfs_rd_uuid, 0, 0 },
{ "ping", 0, lprocfs_wr_ping, 0 },
+ { "connect_flags", lprocfs_rd_connect_flags, 0, 0 },
{ "blocksize", lprocfs_rd_blksize, 0, 0 },
{ "kbytestotal", lprocfs_rd_kbytestotal, 0, 0 },
{ "kbytesfree", lprocfs_rd_kbytesfree, 0, 0 },
LASSERT(req->rq_cb_data == NULL);
req->rq_cb_data = mod;
- CDEBUG(D_HA, "close req->rep_len: %d\n", req->rq_replen);
-
- CDEBUG(D_HA, "close max_mdsize/max_cookiesize: %d/%d\n",
+ CDEBUG(D_HA, "close req->rep_len %d mdsize %d cookiesize %d\n",
+ req->rq_replen,
obd->u.cli.cl_max_mds_easize, obd->u.cli.cl_max_mds_cookiesize);
/* We hand a ref to the rpcd here, so we need another one of our own. */
lprocfs_wr_group_acquire_expire, 0},
{ "group_upcall", lprocfs_rd_group_upcall,
lprocfs_wr_group_upcall, 0},
- { "group_flush", 0, lprocfs_wr_group_flush, 0},
- { "group_info", 0, lprocfs_wr_group_info, 0 },
+ { "group_flush", 0, lprocfs_wr_group_flush, 0},
+ { "group_info", 0, lprocfs_wr_group_info, 0 },
{ 0 }
};
MDS_CHECK_RESENT(req, mds_reconstruct_generic(req));
}
- CDEBUG(D_HA, "close req->rep_len: %d\n", req->rq_replen);
-
- CDEBUG(D_HA, "close max_mdsize/max_cookiesize: %d/%d\n",
+ CDEBUG(D_HA, "close req->rep_len %d mdsize %d cookiesize %d\n",
+ req->rq_replen,
obd->u.mds.mds_max_mdsize, obd->u.mds.mds_max_cookiesize);
-
+
body = lustre_swab_reqbuf(req, offset, sizeof(*body),
lustre_swab_mds_body);
if (body == NULL) {
return snprintf(page, count, "%s\n", conn->c_remote_uuid.uuid);
}
+static const char *obd_connect_names[] = {
+ "read_only",
+ "lov_index",
+ "unused",
+ "write_grant",
+ "server_lock",
+ "version",
+ "request_portal",
+ "acl",
+ "xattr",
+ "create_on_write",
+ "truncate_lock",
+ "initial_transno",
+ "inode_bit_locks",
+ "join_file",
+ NULL
+};
+
+int lprocfs_rd_connect_flags(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
+{
+ struct obd_device *obd = data;
+ __u64 mask = 1, flags;
+ int i, ret;
+
+ if (obd == NULL)
+ return 0;
+
+ flags = obd->u.cli.cl_import->imp_connect_data.ocd_connect_flags;
+ ret = snprintf(page, count, "flags="LPX64"\n", flags);
+ for (i = 0; obd_connect_names[i] != NULL; i++, mask <<= 1) {
+ if (flags & mask)
+ ret += snprintf(page + ret, count - ret, "%s\n",
+ obd_connect_names[i]);
+ }
+ if (flags & ~(mask - 1))
+ ret += snprintf(page + ret, count - ret,
+ "unknown flags "LPX64"\n", flags & ~(mask - 1));
+
+ return ret;
+}
+EXPORT_SYMBOL(lprocfs_rd_connect_flags);
+
int lprocfs_rd_num_exports(char *page, char **start, off_t off, int count,
int *eof, void *data)
{
static struct lprocfs_vars lprocfs_obd_vars[] = {
{ "uuid", lprocfs_rd_uuid, 0, 0 },
{ "ping", 0, lprocfs_wr_ping, 0 },
+ { "connect_flags", lprocfs_rd_connect_flags, 0, 0 },
{ "blocksize", lprocfs_rd_blksize, 0, 0 },
{ "kbytestotal", lprocfs_rd_kbytestotal, 0, 0 },
{ "kbytesfree", lprocfs_rd_kbytesfree, 0, 0 },
osc_wr_max_pages_per_rpc, 0 },
{ "max_rpcs_in_flight", osc_rd_max_rpcs_in_flight,
osc_wr_max_rpcs_in_flight, 0 },
- { "max_dirty_mb", osc_rd_max_dirty_mb, osc_wr_max_dirty_mb, 0 },
+ { "max_dirty_mb", osc_rd_max_dirty_mb, osc_wr_max_dirty_mb, 0 },
{ "cur_dirty_bytes", osc_rd_cur_dirty_bytes, 0, 0 },
{ "cur_grant_bytes", osc_rd_cur_grant_bytes, 0, 0 },
- { "create_count", osc_rd_create_count, osc_wr_create_count, 0 },
+ { "create_count", osc_rd_create_count, osc_wr_create_count, 0 },
{ "prealloc_next_id", osc_rd_prealloc_next_id, 0, 0 },
{ "prealloc_last_id", osc_rd_prealloc_last_id, 0, 0 },
- { "checksums", osc_rd_checksum, osc_wr_checksum, 0 },
+ { "checksums", osc_rd_checksum, osc_wr_checksum, 0 },
{ 0 }
};
if (req->rq_repmsg)
req->rq_repmsg->transno = oti->oti_transno;
+ req->rq_transno = oti->oti_transno;
/* XXX 4 == entries in oti_ack_locks??? */
for (ack_lock = oti->oti_ack_locks, i = 0; i < 4; i++, ack_lock++) {
libcfs_id2str(request->rq_peer),
timeval_sub(&work_end,
&request->rq_arrival_time) / 1000000,
+ request->rq_repmsg ? request->rq_repmsg->transno :
request->rq_transno, request->rq_status,
request->rq_repmsg ? request->rq_repmsg->status : -999);
else
BEFORE=`date +%s`
log "== test $1: $2= `date +%H:%M:%S` ($BEFORE)"
export TESTNAME=test_$1
+ export tfile=f${testnum}
+ export tdir=d${base}
test_$1 || error "exit with rc=$?"
unset TESTNAME
pass "($((`date +%s` - $BEFORE))s)"
test_24m() {
f="$DIR/f24m"
- multiop $f OcLN ${f}2 ${f}2 || error
+ multiop $f OcLN ${f}2 ${f}2 || error "link ${f}2 ${f}2 failed"
+ # on ext3 this does not remove either the source or target files
+ # though the "expected" operation would be to remove the source
+ $CHECKSTAT -t file ${f} || error "${f} missing"
+ $CHECKSTAT -t file ${f}2 || error "${f}2 missing"
}
run_test 24m "Renaming a file to a hard link to itself ========="
touch $testfile
[ "$UID" != 0 ] && echo "skipping $TESTNAME (must run as root)" && return
- [ -z "`mount | grep " $DIR .*\<user_xattr\>"`" ] && echo "skipping $TESTNAME (must have user_xattr)" && return
+ [ -z "grep \<xattr\> /proc/fs/lustre/mdc/MDC*MNT*/connect_flags" ] && echo "skipping $TESTNAME (must have user_xattr)" && return
echo "set/get xattr..."
setfattr -n trusted.name1 -v value1 $testfile || error
[ "`getfattr -n trusted.name1 $testfile 2> /dev/null | \
[ "$UID" != 0 ] && echo "skipping $TESTNAME (must run as root)" && return
[ -z "`mount | grep " $DIR .*\<acl\>"`" ] && echo "skipping $TESTNAME (must have acl)" && return
+ [ -z "grep \<acl\> /proc/fs/lustre/osc/OSC*MNT*/connect_flags" ] && echo "skipping $TESTNAME (must have acl)" && return
echo "performing cp ..."
run_acl_subtest cp || error