# endif
#endif
+#if BITS_PER_LONG > 32
+# define LI_POISON ((int)0x5a5a5a5a5a5a5a5a)
+# define LL_POISON ((long)0x5a5a5a5a5a5a5a5a)
+# define LP_POISON ((void *)(long)0x5a5a5a5a5a5a5a5a)
+#else
+# define LI_POISON ((int)0x5a5a5a5a)
+# define LL_POISON ((long)0x5a5a5a5a)
+# define LP_POISON ((void *)(long)0x5a5a5a5a)
+#endif
+
#if defined(__x86_64__)
# define LPU64 "%Lu"
# define LPD64 "%Ld"
# define LPX64 "%#Lx"
# define LPSZ "%lu"
# define LPSSZ "%ld"
-# define LP_POISON ((void *)0x5a5a5a5a5a5a5a5a)
#elif (BITS_PER_LONG == 32 || __WORDSIZE == 32)
# define LPU64 "%Lu"
# define LPD64 "%Ld"
# define LPX64 "%#Lx"
# define LPSZ "%u"
# define LPSSZ "%d"
-# define LP_POISON ((void *)0x5a5a5a5a)
#elif (BITS_PER_LONG == 64 || __WORDSIZE == 64)
# define LPU64 "%lu"
# define LPD64 "%ld"
# define LPX64 "%#lx"
# define LPSZ "%lu"
# define LPSSZ "%ld"
-# define LP_POISON ((void *)0x5a5a5a5a5a5a5a5a)
#endif
#ifndef LPU64
# error "No word size defined"
- serialize filter_precreate and filter_destroy_precreated (3329)
- clear page cache after eviction (2766)
- resynchronize MDS->OST in background (2824)
+ - loop device shouldn't call sync_dev() for nul device (3092)
+ - push lock cancellation to blocking thread for glimpse ASTs (3409)
+ - don't call osc_set_data_with_check() for TEST_LOCK matches (3159)
* miscellania
- allow default OST striping configuration per directory (1414)
- fix compilation for qswnal for 2.6 kernels (3125)
AC_INIT
AC_CANONICAL_SYSTEM
-AM_INIT_AUTOMAKE(lustre, 1.2.1.12)
+AM_INIT_AUTOMAKE(lustre, 1.2.1.13)
# AM_MAINTAINER_MODE
# Four main targets: lustre kernel modules, utilities, tests, and liblustre
#include <linux/lustre_idl.h>
#include <linux/lustre_cfg.h>
+#ifndef LP_POISON
+#if BITS_PER_LONG > 32
+# define LI_POISON ((int)0x5a5a5a5a5a5a5a5a)
+# define LL_POISON ((long)0x5a5a5a5a5a5a5a5a)
+# define LP_POISON ((void *)(long)0x5a5a5a5a5a5a5a5a)
+#else
+# define LI_POISON ((int)0x5a5a5a5a)
+# define LL_POISON ((long)0x5a5a5a5a)
+# define LP_POISON ((void *)(long)0x5a5a5a5a)
+#endif
+#endif
+
#ifndef LPU64
/* x86_64 has 64bit longs and defines u64 as long long */
#if BITS_PER_LONG > 32 && !defined(__x86_64__)
#define LPU64 "%lu"
#define LPD64 "%ld"
#define LPX64 "%#lx"
-#define LP_POISON ((void *)0x5a5a5a5a5a5a5a5a)
#else
#define LPU64 "%Lu"
#define LPD64 "%Ld"
#define LPX64 "%#Lx"
-#define LP_POISON ((void *)0x5a5a5a5a)
#endif
#endif
/* used by the osc to keep track of what objects to build into rpcs */
struct loi_oap_pages loi_read_lop;
struct loi_oap_pages loi_write_lop;
- struct list_head loi_read_item;
/* _cli_ is poorly named, it should be _ready_ */
struct list_head loi_cli_item;
struct list_head loi_write_item;
+ struct list_head loi_read_item;
int loi_kms_valid:1;
__u64 loi_kms; /* known minimum size */
--- /dev/null
+--- 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
+@@ -978,7 +978,7 @@ static int lo_release(struct inode *inod
+
+ lo = &loop_dev[dev];
+
+- if (!(lo->lo_flags & LO_FLAGS_READ_ONLY)) {
++ if (!(lo->lo_flags & LO_FLAGS_READ_ONLY) && lo->lo_device != 0) {
+ fsync_dev(lo->lo_device);
+ invalidate_buffers(lo->lo_device);
+ }
kernel_text_address-2.4.20-vanilla.patch
procfs-ndynamic-2.4.21-suse2.patch
ext3-truncate-buffer-head.patch
+loop-sync-2.4.21-suse.patch
extern kmem_cache_t *ldlm_lock_slab;
extern struct lustre_lock ldlm_handle_lock;
extern struct list_head ldlm_namespace_list;
-extern int (*mds_reint_p)(int offset, struct ptlrpc_request *req);
-extern int (*mds_getattr_name_p)(int offset, struct ptlrpc_request *req);
static DECLARE_MUTEX(ldlm_ref_sem);
static int ldlm_refcount = 0;
if (lock->l_granted_mode == LCK_PW &&
!lock->l_readers && !lock->l_writers &&
time_after(jiffies, lock->l_last_used + 10 * HZ)) {
+#ifdef __KERNEL__
+ ldlm_bl_to_thread(ns, NULL, lock);
+ l_unlock(&ns->ns_lock);
+#else
l_unlock(&ns->ns_lock);
ldlm_handle_bl_callback(ns, NULL, lock);
+#endif
EXIT;
return;
}
struct lookup_intent *it;
struct lov_stripe_md *lsm;
struct ptlrpc_request *req;
+ struct lookup_intent oit = { .it_op = IT_OPEN,
+ .it_flags = file->f_flags };
int rc = 0;
ENTRY;
it = file->f_it;
- if (!it->d.lustre.it_disposition) {
- struct lookup_intent oit = { .it_op = IT_OPEN,
- .it_flags = file->f_flags };
+ if (!it || !it->d.lustre.it_disposition) {
it = &oit;
rc = ll_intent_file_open(file, NULL, 0, it);
if (rc)
rc = mdc_getattr(sbi->ll_mdc_exp, &fid,
OBD_MD_LINKNAME, symlen, request);
if (rc) {
- CERROR("inode %lu: rc = %d\n", inode->i_ino, rc);
+ if (rc != -ENOENT)
+ CERROR("inode %lu: rc = %d\n", inode->i_ino, rc);
RETURN(rc);
}
* we're sure we won't need to fix up the close request in the future),
* but make sure that replay doesn't poke at the och, which is about to
* be freed. */
- LASSERT(mod != (void *)0x5a5a5a5a);
+ LASSERT(mod != LP_POISON);
if (mod != NULL)
mod->mod_och = NULL;
och->och_mod = NULL;
open_req = mod->mod_open_req;
LASSERT(open_req != NULL);
- LASSERT(open_req != (void *)0x5a5a5a5a);
+ LASSERT(open_req != LP_POISON);
+ LASSERT(open_req->rq_type != LI_POISON);
DEBUG_REQ(D_HA, open_req, "open req balanced");
LASSERT(open_req->rq_transno != 0);
mod = och->och_mod;
if (likely(mod != NULL)) {
mod->mod_close_req = req;
- DEBUG_REQ(D_HA, mod->mod_open_req, "matched open req %p",
- mod->mod_open_req);
+ LASSERT(mod->mod_open_req->rq_type != LI_POISON);
+ DEBUG_REQ(D_HA, mod->mod_open_req, "matched open");
} else {
CDEBUG(D_HA, "couldn't find open req; expecting close error\n");
}
if (req->rq_async_args.pointer_arg[0] != NULL) {
CERROR("returned without dropping rpc_lock: rc %d\n", rc);
mdc_close_interpret(req, &req->rq_async_args, rc);
- portals_debug_dumplog();
+ //portals_debug_dumplog();
}
EXIT;
if ((S_ISREG(inode->i_mode) && (body->valid & OBD_MD_FLEASIZE)) ||
(S_ISDIR(inode->i_mode) && (body->valid & OBD_MD_FLDIREA))) {
- int rc;
+ int ret;
down(&inode->i_sem);
- rc = fsfilt_get_md(req->rq_export->exp_obd, inode, NULL, 0);
+ ret = fsfilt_get_md(req->rq_export->exp_obd, inode, NULL, 0);
up(&inode->i_sem);
CDEBUG(D_INODE, "got %d bytes MD data for inode %lu\n",
rc, inode->i_ino);
- if (rc < 0) {
- if (rc != -ENODATA)
+ if (ret < 0) {
+ if (ret != -ENODATA) {
CERROR("error getting inode %lu MD: rc = %d\n",
- inode->i_ino, rc);
+ inode->i_ino, ret);
+ /* should we return ret in req->rq_status? */
+ }
size[bufcount] = 0;
- } else if (rc > mds->mds_max_mdsize) {
+ } else if (ret > mds->mds_max_mdsize) {
size[bufcount] = 0;
CERROR("MD size %d larger than maximum possible %u\n",
- rc, mds->mds_max_mdsize);
+ ret, mds->mds_max_mdsize);
} else {
- size[bufcount] = rc;
+ size[bufcount] = ret;
}
bufcount++;
} else if (S_ISLNK(inode->i_mode) && (body->valid & OBD_MD_LINKNAME)) {
rc = lustre_pack_reply(req, bufcount, size, NULL);
if (rc) {
- CERROR("out of memory\n");
+ CERROR("lustre_pack_reply failed: rc %d\n", rc);
GOTO(out, req->rq_status = rc);
}
rec->ur_namelen - 1);
if (IS_ERR(dparent)) {
rc = PTR_ERR(dparent);
- CERROR("parent lookup error %d\n", rc);
+ if (rc != -ENOENT)
+ CERROR("parent lookup error %d\n", rc);
GOTO(cleanup, rc);
}
LASSERT(dparent->d_inode != NULL);
acc_mode = 0; /* Don't check for permissions */
}
- LASSERT(!mds_inode_is_orphan(dchild->d_inode));
+ LASSERTF(!mds_inode_is_orphan(dchild->d_inode),
+ "dchild %*s (%p) inode %p\n", dchild->d_name.len,
+ dchild->d_name.name, dchild, dchild->d_inode);
mds_pack_inode2fid(&body->fid1, dchild->d_inode);
mds_pack_inode2body(body, dchild->d_inode);
rec->ur_name, rec->ur_namelen - 1);
if (IS_ERR(dparent)) {
rc = PTR_ERR(dparent);
- CERROR("parent lookup error %d\n", rc);
+ if (rc != -ENOENT)
+ CERROR("parent lookup error %d\n", rc);
GOTO(cleanup, rc);
}
cleanup_phase = 1; /* locked parent dentry */
fidlen = ll_fid2str(fidname, dentry->d_inode->i_ino,
dentry->d_inode->i_generation);
- CDEBUG(D_ERROR, "pending destroy of %dx open file %s = %s\n",
+ CDEBUG(D_ERROR, "pending destroy of %dx open %s %s = %s\n",
mds_open_orphan_count(dentry->d_inode),
+ S_ISDIR(dentry->d_inode->i_mode) ? "dir" :
+ S_ISREG(dentry->d_inode->i_mode) ? "file" : "other",
rec->ur_name, fidname);
pending_child = lookup_one_len(fidname, mds->mds_pending_dir, fidlen);
RETURN(rc);
}
-int oscc_recovering(struct osc_creator *oscc)
+int oscc_recovering(struct osc_creator *oscc)
{
int recov = 0;
RETURN(osc_real_create(exp, oa, ea, oti));
if ((oa->o_valid & OBD_MD_FLFLAGS) &&
- oa->o_flags == OBD_FL_RECREATE_OBJS) {
+ oa->o_flags == OBD_FL_RECREATE_OBJS) {
RETURN(osc_real_create(exp, oa, ea, oti));
}
/* this is the special case where create removes orphans */
if ((oa->o_valid & OBD_MD_FLFLAGS) &&
oa->o_flags == OBD_FL_DELORPHAN) {
- CDEBUG(D_HA, "%s: oscc recovery started\n",
+ CDEBUG(D_HA, "%s: oscc recovery started\n",
exp->exp_obd->obd_name);
LASSERT(oscc->oscc_flags & OSCC_FLAG_RECOVERING);
oa->o_valid |= OBD_MD_FLID;
oa->o_id = oscc->oscc_next_id - 1;
- CDEBUG(D_HA, "%s: deleting to next_id: "LPU64"\n",
+ CDEBUG(D_HA, "%s: deleting to next_id: "LPU64"\n",
exp->exp_obd->obd_name, oa->o_id);
rc = osc_real_create(exp, oa, ea, NULL);
spin_unlock(&oscc->oscc_lock);
- RETURN(rc);
- }
+ RETURN(rc);
+ }
while (try_again) {
- /* If orphans are being recovered, then we must wait until
+ /* If orphans are being recovered, then we must wait until
it is finished before we can continue with create. */
if (oscc_recovering(oscc)) {
struct l_wait_info lwi;
- CDEBUG(D_HA,"%p: oscc recovery in progress, waiting\n",
+ CDEBUG(D_HA,"%p: oscc recovery in progress, waiting\n",
oscc);
lwi = LWI_TIMEOUT(MAX(obd_timeout*HZ/4, 1), NULL, NULL);
oscc);
RETURN(rc);
}
- CDEBUG(D_HA, "%p: oscc recovery over, waking up\n",
+ CDEBUG(D_HA, "%p: oscc recovery over, waking up\n",
oscc);
}
}
if (rc == 0)
- CDEBUG(D_HA, "%s: returning objid "LPU64"\n",
- oscc->oscc_obd->u.cli.cl_import->imp_target_uuid.uuid,
+ CDEBUG(D_HA, "%s: returning objid "LPU64"\n",
+ oscc->oscc_obd->u.cli.cl_import->imp_target_uuid.uuid,
lsm->lsm_object_id);
else if (*ea == NULL)
obd_free_memmd(exp, &lsm);
rc = ldlm_lock_match(obd->obd_namespace, *flags, &res_id, type,
policy, mode, lockh);
if (rc) {
- osc_set_data_with_check(lockh, data);
+ if (!(*flags & LDLM_FL_TEST_LOCK))
+ osc_set_data_with_check(lockh, data);
RETURN(rc);
}
/* If we're trying to read, we also search for an existing PW lock. The
# endif
#endif
+#if BITS_PER_LONG > 32
+# define LI_POISON ((int)0x5a5a5a5a5a5a5a5a)
+# define LL_POISON ((long)0x5a5a5a5a5a5a5a5a)
+# define LP_POISON ((void *)(long)0x5a5a5a5a5a5a5a5a)
+#else
+# define LI_POISON ((int)0x5a5a5a5a)
+# define LL_POISON ((long)0x5a5a5a5a)
+# define LP_POISON ((void *)(long)0x5a5a5a5a)
+#endif
+
#if defined(__x86_64__)
# define LPU64 "%Lu"
# define LPD64 "%Ld"
# define LPX64 "%#Lx"
# define LPSZ "%lu"
# define LPSSZ "%ld"
-# define LP_POISON ((void *)0x5a5a5a5a5a5a5a5a)
#elif (BITS_PER_LONG == 32 || __WORDSIZE == 32)
# define LPU64 "%Lu"
# define LPD64 "%Ld"
# define LPX64 "%#Lx"
# define LPSZ "%u"
# define LPSSZ "%d"
-# define LP_POISON ((void *)0x5a5a5a5a)
#elif (BITS_PER_LONG == 64 || __WORDSIZE == 64)
# define LPU64 "%lu"
# define LPD64 "%ld"
# define LPX64 "%#lx"
# define LPSZ "%lu"
# define LPSSZ "%ld"
-# define LP_POISON ((void *)0x5a5a5a5a5a5a5a5a)
#endif
#ifndef LPU64
# error "No word size defined"
noinst_SCRIPTS += sanity.sh rundbench
noinst_PROGRAMS = openunlink testreq truncate directio openme writeme open_delay
noinst_PROGRAMS += tchmod toexcl fsx test_brw openclose createdestroy
-noinst_PROGRAMS += stat createmany statmany multifstat createtest mlink utime cmknod
+noinst_PROGRAMS += stat createmany statmany multifstat createtest mlink utime
noinst_PROGRAMS += opendirunlink opendevunlink unlinkmany fchdir_test checkstat
noinst_PROGRAMS += wantedi statone runas openfile getdents mkdirdeep o_directory
-noinst_PROGRAMS += small_write multiop sleeptest ll_sparseness_verify
+noinst_PROGRAMS += small_write multiop sleeptest ll_sparseness_verify cmknod
noinst_PROGRAMS += ll_sparseness_write mrename ll_dirstripe_verify
+noinst_PROGRAMS += rename_many
# noinst_PROGRAMS += ldaptest
bin_PROGRAMS = mcreate munlink mkdirmany iopentest1 iopentest2
endif # TESTS
pid=$!
sleep 1
- # allow the open to complete
- usleep 500
-
# This will cause the CLOSE to fail before even
# allocating a reply buffer
$LCTL --device $mdcdev deactivate
$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 ..' failed after removing cwd"
+ $TRACE cd .. || true #bug 3415 error "'cd ..' failed after removing cwd"
}
run_test 48c "Access removed working subdir (should return errors)"
$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 .. && 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"