}
#endif /* __arch_um__ */
+struct task_struct *portals_current(void)
+{
+ CWARN("current task struct is %p\n", current);
+ return current;
+}
+
EXPORT_SYMBOL(stack_backtrace_lock);
EXPORT_SYMBOL(portals_debug_dumpstack);
+EXPORT_SYMBOL(portals_current);
#endif /* __KERNEL__ */
EXPORT_SYMBOL(portals_debug_dumplog);
char *
ptl_nid2str (char *buffer, ptl_nid_t nid)
{
- __u32 addr = htonl((__u32)nid); /* back to NETWORK byte order */
- struct hostent *he = gethostbyaddr ((const char *)&addr, sizeof (addr), AF_INET);
+ struct hostent *he = NULL;
+ /* Don't try to resolve NIDs that are e.g. Elan host IDs. Assume
+ * TCP addresses in the 0.x.x.x subnet are not in use. This can
+ * happen on routers and slows things down a _lot_. Bug 3442. */
+ if (nid & 0xff000000) {
+ __u32 addr = htonl((__u32)nid); /* back to NETWORK byte order */
+ he = gethostbyaddr((const char *)&addr, sizeof(addr), AF_INET);
+ }
if (he != NULL)
- strcpy (buffer, he->h_name);
+ sprintf(buffer, "%#x:%s", (int)(nid >> 32), he->h_name);
else
- sprintf (buffer, LPX64, nid);
-
+ sprintf(buffer, LPX64, nid);
+
return (buffer);
}
+tbd Cluster File Systems, Inc. <info@clusterfs.com>
+ * version 1.2.3
+ * bug fixes
+ - clean kiobufs before and after use (3485)
+ - strip trailing '/'s before comparing paths with /proc/mounts (3486)
+ - remove assertions to work around "in-flight rpcs" recovery bug (3063)
+ - change init script to fail more clearly if not run as root (1528)
+ - fix ns_lock/i_sem lock ordering deadlock for kms update (3477)
+ - don't do DNS lookups on NIDs too small for IP addresses (3442)
+ * miscellania
+ - servers can dump a log evicting a client - lustre.dump_on_timeout=1
+
2004-05-27 Cluster File Systems, Inc. <info@clusterfs.com>
* version 1.2.2
* bug fixes
- fix compilation for qswnal for 2.6 kernels (3125)
- increase maximum number of MDS request buffers for large systems
- change liblustreapi to be useful for external progs like lfsck (3098)
+ - increase local configuration timeout for slow disks (3353)
+ - allow configuring ldlm AST timeout - lustre.ldlm_timeout=<seconds>
2004-03-22 Cluster File Systems, Inc. <info@clusterfs.com>
* version 1.2.1
AC_INIT
AC_CANONICAL_SYSTEM
-AM_INIT_AUTOMAKE(lustre, 1.2.2)
+AM_INIT_AUTOMAKE(lustre, 1.2.2.1ra)
# AM_MAINTAINER_MODE
# Four main targets: lustre kernel modules, utilities, tests, and liblustre
extern atomic_t obd_memory;
extern int obd_memmax;
extern unsigned int obd_fail_loc;
+extern unsigned int obd_dump_on_timeout;
extern unsigned int obd_timeout;
extern unsigned int ldlm_timeout;
extern char obd_lustre_upcall[128];
---- drivers/block/loop.c.bu 2004-05-11 16:27:23.000000000 -0700
-+++ drivers/block/loop.c 2004-05-11 16:28:50.000000000 -0700
+--- linux/drivers/block/loop.c.bu 2004-05-11 16:27:23.000000000 -0700
++++ linux/drivers/block/loop.c 2004-05-11 16:28:50.000000000 -0700
@@ -978,7 +978,7 @@ static int lo_release(struct inode *inod
lo = &loop_dev[dev];
/* When a lock is cancelled by a client, the KMS may undergo change if this
* is the "highest lock". This function returns the new KMS value.
+ * Caller must hold ns_lock already.
*
* NB: A lock on [x,y] protects a KMS of up to y + 1 bytes! */
__u64 ldlm_extent_shift_kms(struct ldlm_lock *lock, __u64 old_kms)
* calculation of the kms */
lock->l_flags |= LDLM_FL_KMS_IGNORE;
- l_lock(&res->lr_namespace->ns_lock);
list_for_each(tmp, &res->lr_granted) {
lck = list_entry(tmp, struct ldlm_lock, l_res_link);
continue;
if (lck->l_policy_data.l_extent.end >= old_kms)
- GOTO(out, kms = old_kms);
+ RETURN(old_kms);
/* This extent _has_ to be smaller than old_kms (checked above)
* so kms can only ever be smaller or the same as old_kms. */
}
LASSERTF(kms <= old_kms, "kms "LPU64" old_kms "LPU64"\n", kms, old_kms);
- GOTO(out, kms);
- out:
- l_unlock(&res->lr_namespace->ns_lock);
- return kms;
+ RETURN(kms);
}
char *lli_symlink_name;
struct semaphore lli_open_sem;
__u64 lli_maxbytes;
- unsigned long lli_flags;
+ unsigned long lli_flags;
/* for libsysio */
struct file_identifier lli_sysio_fid;
dev_t lli_st_rdev;
loff_t lli_st_size;
unsigned int lli_st_blksize;
- unsigned int lli_st_blocks;
+ unsigned long lli_st_blocks;
time_t lli_st_atime;
time_t lli_st_mtime;
time_t lli_st_ctime;
int llu_iop_iodone(struct ioctx *ioctxp __IS_UNUSED);
struct llu_sysio_callback_args*
llu_file_write(struct inode *inode, const struct iovec *iovec,
- size_t iovlen, loff_t pos);
+ size_t iovlen, loff_t pos);
struct llu_sysio_callback_args*
llu_file_read(struct inode *inode, const struct iovec *iovec,
size_t iovlen, loff_t pos);
-int llu_glimpse_size(struct inode *inode, struct ost_lvb *lvb);
+int llu_glimpse_size(struct inode *inode);
int llu_extent_lock(struct ll_file_data *fd, struct inode *inode,
struct lov_stripe_md *lsm, int mode,
ldlm_policy_data_t *policy, struct lustre_handle *lockh,
/* bug 2334: drop MDS lock before acquiring OST lock */
ll_intent_drop_lock(it);
- rc = llu_glimpse_size(inode, &lvb);
+ rc = llu_glimpse_size(inode);
if (rc) {
I_RELE(inode);
RETURN(rc);
}
- lli->lli_st_size = lvb.lvb_size;
}
} else {
ENTRY;
lsm = lli->lli_smd;
stripe = llu_lock_to_stripe_offset(inode, lock);
+ l_lock(&lock->l_resource->lr_namespace->ns_lock);
kms = ldlm_extent_shift_kms(lock,
lsm->lsm_oinfo[stripe].loi_kms);
+ l_unlock(&lock->l_resource->lr_namespace->ns_lock);
if (lsm->lsm_oinfo[stripe].loi_kms != kms)
LDLM_DEBUG(lock, "updating kms from "LPU64" to "LPU64,
lsm->lsm_oinfo[stripe].loi_kms, kms);
}
__u64 lov_merge_size(struct lov_stripe_md *lsm, int kms);
+__u64 lov_merge_blocks(struct lov_stripe_md *lsm);
__u64 lov_merge_mtime(struct lov_stripe_md *lsm, __u64 current_time);
/* NB: lov_merge_size will prefer locally cached writes if they extend the
* file (because it prefers KMS over RSS when larger) */
-int llu_glimpse_size(struct inode *inode, struct ost_lvb *lvb)
+int llu_glimpse_size(struct inode *inode)
{
struct llu_inode_info *lli = llu_i2info(inode);
struct llu_sb_info *sbi = llu_i2sbi(inode);
if (rc > 0)
RETURN(-EIO);
- lvb->lvb_size = lov_merge_size(lli->lli_smd, 0);
- //inode->i_mtime = lov_merge_mtime(lli->lli_smd, inode->i_mtime);
+ lli->lli_st_size = lov_merge_size(lli->lli_smd, 0);
+ lli->lli_st_blocks = lov_merge_blocks(lli->lli_smd);
+ //lli->lli_st_mtime = lov_merge_mtime(lli->lli_smd, lli->lli_st_mtime);
+
+ CDEBUG(D_DLMTRACE, "glimpse: size: %llu, blocks: %lu\n",
+ lli->lli_st_size, lli->lli_st_blocks);
- CDEBUG(D_DLMTRACE, "glimpse: size: "LPU64"\n", lvb->lvb_size);
obd_cancel(sbi->ll_osc_exp, lli->lli_smd, LCK_PR, &lockh);
/* A glimpse is necessary to determine whether we
* return a short read or some zeroes at the end of
* the buffer */
- struct ost_lvb lvb;
- if (llu_glimpse_size(inode, &lvb)) {
- llu_extent_unlock(fd, inode, lsm, LCK_PR, &lockh);
+ if (llu_glimpse_size(inode)) {
+ llu_extent_unlock(fd, inode, lsm,LCK_PR,&lockh);
GOTO(err_out, err = -ENOLCK);
}
- lli->lli_st_size = lvb.lvb_size;
} else {
lli->lli_st_size = kms;
}
/* ll_glimpse_size will prefer locally cached writes if they extend
* the file */
- {
- struct ost_lvb lvb;
- ldlm_error_t err;
-
- err = llu_glimpse_size(inode, &lvb);
- lli->lli_st_size = lvb.lvb_size;
- }
- RETURN(0);
+ RETURN(llu_glimpse_size(inode));
}
static void copy_stat_buf(struct inode *ino, struct intnl_stat *b)
stripe = ll_lock_to_stripe_offset(inode, lock);
ll_pgcache_remove_extent(inode, lsm, lock, stripe);
+ l_lock(&lock->l_resource->lr_namespace->ns_lock);
down(&inode->i_sem);
kms = ldlm_extent_shift_kms(lock,
lsm->lsm_oinfo[stripe].loi_kms);
-
+
if (lsm->lsm_oinfo[stripe].loi_kms != kms)
LDLM_DEBUG(lock, "updating kms from "LPU64" to "LPU64,
lsm->lsm_oinfo[stripe].loi_kms, kms);
lsm->lsm_oinfo[stripe].loi_kms = kms;
up(&inode->i_sem);
+ l_unlock(&lock->l_resource->lr_namespace->ns_lock);
//ll_try_done_writing(inode);
iput:
iput(inode);
lvb = lock->l_lvb_data;
lsm->lsm_oinfo[stripe].loi_rss = lvb->lvb_size;
+ l_lock(&lock->l_resource->lr_namespace->ns_lock);
down(&inode->i_sem);
kms = MAX(lsm->lsm_oinfo[stripe].loi_kms, lvb->lvb_size);
kms = ldlm_extent_shift_kms(NULL, kms);
lsm->lsm_oinfo[stripe].loi_kms, kms);
lsm->lsm_oinfo[stripe].loi_kms = kms;
up(&inode->i_sem);
+ l_unlock(&lock->l_resource->lr_namespace->ns_lock);
}
iput(inode);
/* NB: lov_merge_size will prefer locally cached writes if they extend the
* file (because it prefers KMS over RSS when larger) */
-int ll_glimpse_size(struct inode *inode, struct ost_lvb *lvb)
+int ll_glimpse_size(struct inode *inode)
{
struct ll_inode_info *lli = ll_i2info(inode);
struct ll_sb_info *sbi = ll_i2sbi(inode);
rc = obd_enqueue(sbi->ll_osc_exp, lli->lli_smd, LDLM_EXTENT, &policy,
LCK_PR, &flags, ll_extent_lock_callback,
ldlm_completion_ast, ll_glimpse_callback, inode,
- sizeof(*lvb), lustre_swab_ost_lvb, &lockh);
+ sizeof(struct ost_lvb), lustre_swab_ost_lvb, &lockh);
if (rc != 0) {
CERROR("obd_enqueue returned rc %d, returning -EIO\n", rc);
RETURN(rc > 0 ? -EIO : rc);
}
- lvb->lvb_size = lov_merge_size(lli->lli_smd, 0);
+ inode->i_size = lov_merge_size(lli->lli_smd, 0);
inode->i_blocks = lov_merge_blocks(lli->lli_smd);
//inode->i_mtime = lov_merge_mtime(lli->lli_smd, inode->i_mtime);
- CDEBUG(D_DLMTRACE, "glimpse: size: "LPU64", blocks: "LPU64"\n",
- lvb->lvb_size, lvb->lvb_blocks);
+ CDEBUG(D_DLMTRACE, "glimpse: size: %llu, blocks: %lu\n",
+ inode->i_size, inode->i_blocks);
obd_cancel(sbi->ll_osc_exp, lli->lli_smd, LCK_PR, &lockh);
if (*ppos + count - 1 > kms) {
/* A glimpse is necessary to determine whether we return a short
* read or some zeroes at the end of the buffer */
- struct ost_lvb lvb;
- retval = ll_glimpse_size(inode, &lvb);
+ retval = ll_glimpse_size(inode);
if (retval)
goto out;
- inode->i_size = lvb.lvb_size;
} else {
inode->i_size = kms;
}
/* ll_glimpse_size will prefer locally cached writes if they extend
* the file */
- {
- struct ost_lvb lvb;
-
- rc = ll_glimpse_size(inode, &lvb);
- inode->i_size = lvb.lvb_size;
- }
+ rc = ll_glimpse_size(inode);
RETURN(rc);
}
int ll_file_open(struct inode *inode, struct file *file);
int ll_file_release(struct inode *inode, struct file *file);
int ll_lsm_getattr(struct obd_export *, struct lov_stripe_md *, struct obdo *);
-int ll_glimpse_size(struct inode *inode, struct ost_lvb *lvb);
+int ll_glimpse_size(struct inode *inode);
int ll_local_open(struct file *file, struct lookup_intent *it);
int ll_mdc_close(struct obd_export *mdc_exp, struct inode *inode,
struct file *file);
if (it->it_op == IT_GETATTR && S_ISREG(inode->i_mode) &&
ll_i2info(inode)->lli_smd != NULL) {
struct lov_stripe_md *lsm = ll_i2info(inode)->lli_smd;
- struct ost_lvb lvb;
ldlm_error_t rc;
LASSERT(lsm->lsm_object_id != 0);
/* bug 2334: drop MDS lock before acquiring OST lock */
ll_intent_drop_lock(it);
- rc = ll_glimpse_size(inode, &lvb);
+ rc = ll_glimpse_size(inode);
if (rc) {
iput(inode);
RETURN(rc);
}
- inode->i_size = lvb.lvb_size;
}
dentry = *de = ll_find_alias(inode, dentry);
* Even when merging RSS, we will take the KMS value if it's larger.
* This prevents getattr from stomping on dirty cached pages which
* extend the file size. */
-__u64 lov_merge_size(struct lov_stripe_md *lsm, int kms)
+__u64 lov_merge_size(struct lov_stripe_md *lsm, int kms_only)
{
struct lov_oinfo *loi;
__u64 size = 0;
i++, loi++) {
obd_size lov_size, tmpsize;
+ CDEBUG(D_DLMTRACE, "stripe %u ost %u kms "LPU64" rss "LPU64"\n",
+ i, loi->loi_ost_idx, loi->loi_kms, loi->loi_rss);
tmpsize = loi->loi_kms;
- if (kms == 0 && loi->loi_rss > tmpsize)
+ if (kms_only == 0 && loi->loi_rss > tmpsize)
tmpsize = loi->loi_rss;
lov_size = lov_stripe_size(lsm, tmpsize, i);
/* The following are visible and mutable through /proc/sys/lustre/. */
unsigned int obd_fail_loc;
+unsigned int obd_dump_on_timeout;
unsigned int obd_timeout = 100;
unsigned int ldlm_timeout = 6;
char obd_lustre_upcall[128] = "DEFAULT"; /* or NONE or /full/path/to/upcall */
EXPORT_SYMBOL(obdo_cachep);
EXPORT_SYMBOL(obd_fail_loc);
EXPORT_SYMBOL(obd_race_waitq);
+EXPORT_SYMBOL(obd_dump_on_timeout);
EXPORT_SYMBOL(obd_timeout);
EXPORT_SYMBOL(ldlm_timeout);
EXPORT_SYMBOL(obd_lustre_upcall);
enum {
OBD_FAIL_LOC = 1, /* control test failures instrumentation */
OBD_TIMEOUT, /* RPC timeout before recovery/intr */
+ OBD_DUMP_ON_TIMEOUT, /* dump kernel debug log upon eviction */
OBD_UPCALL, /* path to recovery upcall */
OBD_SYNCFILTER, /* XXX temporary, as we play with sync osts.. */
OBD_LDLM_TIMEOUT, /* LDLM timeout for ASTs before client eviction */
&proc_dointvec},
{OBD_TIMEOUT, "timeout", &obd_timeout, sizeof(int), 0644, NULL,
&proc_fail_loc},
+ {OBD_DUMP_ON_TIMEOUT, "dump_on_timeout", &obd_dump_on_timeout,
+ sizeof(int), 0644, NULL, &proc_dointvec},
/* XXX need to lock so we avoid update races with recovery upcall! */
{OBD_UPCALL, "upcall", obd_lustre_upcall, 128, 0644, NULL,
&proc_dostring, &sysctl_string },
{OBD_SYNCFILTER, "filter_sync_on_commit", &obd_sync_filter, sizeof(int),
0644, NULL, &proc_dointvec},
- {OBD_TIMEOUT, "ldlm_timeout", &ldlm_timeout, sizeof(int), 0644, NULL,
- &proc_dointvec},
+ {OBD_LDLM_TIMEOUT, "ldlm_timeout", &ldlm_timeout, sizeof(int), 0644,
+ NULL, &proc_dointvec},
{ 0 }
};
down(&res->lr_lvb_sem);
res_lvb = res->lr_lvb_data;
LASSERT(res_lvb != NULL);
- reply_lvb->lvb_size = res_lvb->lvb_size;
- reply_lvb->lvb_blocks = res_lvb->lvb_blocks;
+ memcpy(reply_lvb, res_lvb, sizeof(*reply_lvb));
up(&res->lr_lvb_sem);
list_for_each(tmp, &res->lr_granted) {
if (rc)
GOTO(err_mntput, rc);
-
filter->fo_destroy_in_progress = 0;
sema_init(&filter->fo_create_lock, 1);
return 1;
}
+/* some kernels require alloc_kiovec callers to zero members through the use of
+ * map_user_kiobuf and unmap_.. we don't use those, so we have a little helper
+ * that makes sure we don't break the rules. */
+static void clear_kiobuf(struct kiobuf *iobuf)
+{
+ int i;
+
+ for (i = 0; i < iobuf->array_len; i++)
+ iobuf->maplist[i] = NULL;
+
+ iobuf->nr_pages = 0;
+ iobuf->offset = 0;
+ iobuf->length = 0;
+}
+
int filter_commitrw_write(struct obd_export *exp, struct obdo *oa, int objcount,
struct obd_ioobj *obj, int niocount,
struct niobuf_local *res, struct obd_trans_info *oti,
if (rc)
GOTO(cleanup, rc);
- iobuf->offset = 0;
- iobuf->length = 0;
- iobuf->nr_pages = 0;
+ clear_kiobuf(iobuf);
cleanup_phase = 1;
fso.fso_dentry = res->dentry;
pop_ctxt(&saved, &obd->obd_ctxt, NULL);
LASSERT(current->journal_info == NULL);
case 1:
+ clear_kiobuf(iobuf);
free_kiovec(1, &iobuf);
case 0:
for (i = 0, lnb = res; i < obj->ioo_bufcnt; i++, lnb++) {
push_ctxt(&saved, &obd->obd_ctxt, NULL);
cleanup_phase = 2;
+ generic_osync_inode(inode, inode->i_mapping, OSYNC_DATA|OSYNC_METADATA);
+
oti->oti_handle = fsfilt_brw_start(obd, objcount, &fso,
niocount, res, oti);
offs = k * inode->i_sb->s_blocksize;
if (!bio || !can_be_merged(bio, sector) ||
- !bio_add_page(bio, lnb->page, lnb->len, offs)) {
+ !bio_add_page(bio, lnb->page, PAGE_SIZE, offs)) {
if (bio) {
atomic_inc(&dreq->numreqs);
submit_bio(WRITE, bio);
bio->bi_end_io = dio_complete_routine;
bio->bi_private = dreq;
- if (!bio_add_page(bio, lnb->page, lnb->len, 0))
+ if (!bio_add_page(bio, lnb->page, PAGE_SIZE,
+ offs))
LBUG();
}
}
iattr.ia_size = this_size;
}
-#warning This probably needs filemap_fdatasync() like filter_io_24 (bug 2366)
if (bio) {
atomic_inc(&dreq->numreqs);
submit_bio(WRITE, bio);
}
#endif /* __arch_um__ */
+struct task_struct *portals_current(void)
+{
+ CWARN("current task struct is %p\n", current);
+ return current;
+}
+
EXPORT_SYMBOL(stack_backtrace_lock);
EXPORT_SYMBOL(portals_debug_dumpstack);
+EXPORT_SYMBOL(portals_current);
#endif /* __KERNEL__ */
EXPORT_SYMBOL(portals_debug_dumplog);
char *
ptl_nid2str (char *buffer, ptl_nid_t nid)
{
- __u32 addr = htonl((__u32)nid); /* back to NETWORK byte order */
- struct hostent *he = gethostbyaddr ((const char *)&addr, sizeof (addr), AF_INET);
+ struct hostent *he = NULL;
+ /* Don't try to resolve NIDs that are e.g. Elan host IDs. Assume
+ * TCP addresses in the 0.x.x.x subnet are not in use. This can
+ * happen on routers and slows things down a _lot_. Bug 3442. */
+ if (nid & 0xff000000) {
+ __u32 addr = htonl((__u32)nid); /* back to NETWORK byte order */
+ he = gethostbyaddr((const char *)&addr, sizeof(addr), AF_INET);
+ }
if (he != NULL)
- strcpy (buffer, he->h_name);
+ sprintf(buffer, "%#x:%s", (int)(nid >> 32), he->h_name);
else
- sprintf (buffer, LPX64, nid);
-
+ sprintf(buffer, LPX64, nid);
+
return (buffer);
}
if (req->rq_waiting || req->rq_resend) {
int status;
- LASSERT (!ptlrpc_client_receiving_reply(req));
- LASSERT (req->rq_bulk == NULL ||
- !ptlrpc_bulk_active(req->rq_bulk));
-
spin_lock_irqsave(&imp->imp_lock, flags);
- if (ptlrpc_import_delay_req(imp, req, &status)) {
+ if (ptlrpc_import_delay_req(imp, req, &status)){
spin_unlock_irqrestore(&imp->imp_lock,
flags);
continue;
if (req->rq_bulk) {
__u64 old_xid = req->rq_xid;
+ ptlrpc_unregister_bulk (req);
+
/* ensure previous bulk fails */
req->rq_xid = ptlrpc_next_xid();
CDEBUG(D_HA, "resend bulk "
CDEBUG(D_HA, "disconnecting export %p/%s\n",
exp, exp->exp_client_uuid.uuid);
+ if (obd_dump_on_timeout)
+ portals_debug_dumplog();
+
/* Most callers into obd_disconnect are removing their own reference
* (request, for example) in addition to the one from the hash table.
* We don't have such a reference here, so make one. */
start() {
echo -n "Starting $SERVICE: "
+ if [ $UID -ne 0 ]; then
+ echo "Lustre should be started as root"
+ RETVAL=1
+ return
+ fi
${LCONF} ${LCONF_START_ARGS}
RETVAL=$?
echo $SERVICE
stop() {
echo -n "Shutting down $SERVICE: "
+ if [ $UID -ne 0 ]; then
+ echo "Lustre should be stopped as root"
+ RETVAL=1
+ return
+ fi
${LCONF} ${LCONF_STOP_ARGS}
RETVAL=$?
echo $SERVICE
export PATH=$PWD/$SRCDIR:$SRCDIR:$SRCDIR/../utils:$PATH
TMP=${TMP:-/tmp}
+FSTYPE=${FSTYPE:-ext3}
CHECKSTAT=${CHECKSTAT:-"checkstat -v"}
CREATETEST=${CREATETEST:-createtest}
sh llmountcleanup.sh > /dev/null || exit 20
I_MOUNTED=no
}
-CLEAN=${CLEAN:-clean}
+CLEAN=${CLEAN:-:}
start() {
echo -n "mnt.."
I_MOUNTED=yes
echo "done"
}
-START=${START:-start}
+START=${START:-:}
log() {
echo "$*"
echo preparing for tests involving mounts
EXT2_DEV=${EXT2_DEV:-/tmp/SANITY.LOOP}
touch $EXT2_DEV
-mke2fs -F $EXT2_DEV 1000 > /dev/null
-
-EXT3_DEV=${EXT3_DEV:-/tmp/SANITY_EXT3_DEV.LOOP}
-touch $EXT3_DEV
-mkfs.ext3 -F $EXT3_DEV 10000 > /dev/null
+mke2fs -j -F $EXT2_DEV 8000 > /dev/null
test_0() {
touch $DIR/f
multiop $DIR/f31c Ouc
usleep 500
kill -USR1 $MULTIPID
- wait $MUTLIPID
+ wait $MULTIPID
}
run_test 31c "open-unlink file with multiple links ============="
cd . && error "'cd .' worked after removing cwd"
mkdir . && error "'mkdir .' worked after removing cwd"
rmdir . && error "'rmdir .' worked after removing cwd"
- ln -s . foo && error "'ln -s .' worked after removing cwd" || true
- cd .. || error "'cd ..' failed after removing cwd"
+ ln -s . foo && error "'ln -s .' worked after removing cwd"
+ cd .. || echo "'cd ..' failed after removing cwd `pwd`" #bug 3517
}
run_test 48b "Access removed working dir (should return errors)="
#set -vx
mkdir -p $DIR/d48c/dir
cd $DIR/d48c/dir
- rmdir $DIR/d48c/dir || error "remove cwd $DIR/d48c/dir failed"
+ $TRACE rmdir $DIR/d48c/dir || error "remove cwd $DIR/d48c/dir failed"
$TRACE touch foo && error "'touch foo' worked after removing cwd"
$TRACE mkdir foo && error "'mkdir foo' worked after removing cwd"
$TRACE ls . && error "'ls .' worked after removing cwd"
$TRACE cd . && error "'cd .' worked after removing cwd"
$TRACE mkdir . && error "'mkdir .' worked after removing cwd"
$TRACE rmdir . && error "'rmdir .' worked after removing cwd"
- $TRACE ln -s . foo && error "'ln -s .' worked after removing cwd" ||true
- $TRACE cd .. || true #bug 3415 error "'cd ..' failed after removing cwd"
+ $TRACE ln -s . foo && error "'ln -s .' worked after removing cwd"
+ $TRACE cd .. || echo "'cd ..' failed after removing cwd `pwd`" #bug 3415
}
run_test 48c "Access removed working subdir (should return errors)"
#set -vx
mkdir -p $DIR/d48d/dir
cd $DIR/d48d/dir
- rm -r $DIR/d48d || error "remove cwd and parent $DIR/d48d failed"
- $TRACE touch foo && error "'touch foo' worked after removing cwd"
- $TRACE mkdir foo && error "'mkdir foo' worked after removing cwd"
- $TRACE ls . && error "'ls .' worked after removing cwd"
- $TRACE ls .. #bug 3415 && error "'ls ..' worked after removing cwd"
- $TRACE cd . && error "'cd .' worked after recreate cwd"
- $TRACE mkdir . && error "'mkdir .' worked after removing cwd"
- $TRACE rmdir . && error "'rmdir .' worked after removing cwd"
- $TRACE ln -s . foo && error "'ln -s .' worked after removing cwd" ||true
- $TRACE cd .. && error "'cd ..' worked after recreate cwd" || true
+ $TRACE rmdir $DIR/d48d/dir || error "remove cwd $DIR/d48d/dir failed"
+ $TRACE rmdir $DIR/d48d || error "remove parent $DIR/d48d failed"
+ $TRACE touch foo && error "'touch foo' worked after removing parent"
+ $TRACE mkdir foo && error "'mkdir foo' worked after removing parent"
+ $TRACE ls . && error "'ls .' worked after removing parent"
+ $TRACE ls .. && error "'ls ..' worked after removing parent"
+ $TRACE cd . && error "'cd .' worked after recreate parent"
+ $TRACE mkdir . && error "'mkdir .' worked after removing parent"
+ $TRACE rmdir . && error "'rmdir .' worked after removing parent"
+ $TRACE ln -s . foo && error "'ln -s .' worked after removing parent"
+ $TRACE cd .. && error "'cd ..' worked after recreate parent" || true
}
run_test 48d "Access removed parent subdir (should return errors)"
}
run_test 54d "fifo device works in lustre ======================"
+check_fstype() {
+ grep -q $FSTYPE /proc/filesystems && return 0
+ modprobe $FSTYPE
+ grep -q $FSTYPE /proc/filesystems && return 0
+ insmod ../$FSTYPE/$FSTYPE.o
+ grep -q $FSTYPE /proc/filesystems && return 0
+ return 1
+}
+
test_55() {
rm -rf $DIR/d55
mkdir $DIR/d55
- mount -t ext3 -o loop,iopen $EXT3_DEV $DIR/d55 || error "mounting"
+ check_fstype && echo "can't find fs $FSTYPE, skipping test 55" && return
+ mount -t $FSTYPE -o loop,iopen $EXT2_DEV $DIR/d55 || error "mounting"
touch $DIR/d55/foo
$IOPENTEST1 $DIR/d55/foo $DIR/d55 || error "running $IOPENTEST1"
$IOPENTEST2 $DIR/d55 || error "running $IOPENTEST2"
- echo "check for $EXT3_DEV. Please wait..."
+ echo "check for $EXT2_DEV. Please wait..."
rm -rf $DIR/d55/*
umount $DIR/d55 || error "unmounting"
}
#etc
OSTSIZE=${OSTSIZE:-100000}
STRIPECNT=${STRIPECNT:-1}
+STRIPESZ=${STRIPESZ:-$((1024 * 1024))}
OSDTYPE=${OSDTYPE:-obdfilter}
OSTFAILOVER=${OSTFAILOVER:-}
${LMC} -m $config --add mds --format --node $MDSNODE --mds mds1 --fstype $FSTYPE --dev $MDSDEV --size $MDSSIZE ||exit 10
# configure ost
-${LMC} -m $config --add lov --lov lov1 --mds mds1 --stripe_sz 65536 --stripe_cnt $STRIPECNT --stripe_pattern 0 || exit 20
+${LMC} -m $config --add lov --lov lov1 --mds mds1 --stripe_sz $STRIPESZ --stripe_cnt $STRIPECNT --stripe_pattern 0 || exit 20
COUNT=1
echo -n "adding OST on:"
for NODE in $OSTNODES; do
return client_uuid[:36]
+def my_rstrip(s, chars):
+ """my_rstrip(s, chars) -> strips any instances of the characters
+ found in chars from the right side of string s"""
+ # XXX required because python versions pre 2.2.3 don't allow
+ #string.rstrip() to take alternate char lists
+ import string
+ ns=s
+ try:
+ ns = string.rstrip(s, '/')
+ except TypeError, e:
+ for i in range(len(s) - 1, 0, -1):
+ if s[i] in chars:
+ continue
+ else:
+ ns = s[0:i+1]
+ break
+ return ns
+
+
class Mountpoint(Module):
def __init__(self,db):
Module.__init__(self, 'MTPT', db)
- self.path = self.db.get_val('path')
+ self.path = my_rstrip(self.db.get_val('path'), '/')
self.fs_uuid = self.db.get_first_ref('filesystem')
fs = self.db.lookup(self.fs_uuid)
self.mds_uuid = fs.get_first_ref('mds')
"/proc/qsnet/elan3/config/eventint_punt_loops",
"/proc/qsnet/elan4/config/elan4_mainint_punt_loops"]
for p in procfiles:
- if os.access(p, os.R_OK):
- run ("echo 0 > " + p)
+ if os.access(p, os.W_OK):
+ run ("echo 1 > " + p)
def sys_set_ptldebug(ptldebug):
if config.ptldebug:
printf("port: %d\n", lmd->lmd_port);
for (i = 0; i < route_index; i++)
- printf("route: 0x%llx : 0x%llx - 0x%llx\n",
+ printf("route: "LPX64" : "LPX64" - "LPX64"\n",
routes[i].gw, routes[i].lo, routes[i].hi);
return 0;
rc = l_ioctl(PORTALS_DEV_ID, IOC_PORTAL_NAL_CMD, &data);
if (rc != 0) {
fprintf(stderr, "%s: Unable to add route "
- "0x%llx : 0x%llx - 0x%llx\n[%d] %s\n",
- progname, routes[i].gw, routes[i].lo,
- routes[i].hi, errno, strerror(errno));
+ LPX64" : "LPX64" - "LPX64"\n[%d] %s\n",
+ progname, routes[i].gw, routes[i].lo,
+ routes[i].hi, errno, strerror(errno));
err = -1;
break;
}