/- improved monitor read model
- osd bugfixes
-kclient review
-- andi
-/ - server-specified max file size
-/ - pr_debug
-/ - top of file comments
-- test nfs export
+v0.11
+(andi)
+/- server-specified max file size
+/- simplified pr_debug macro
+/- more comments
+/- added a few missing '__attribute__ ((packed))'
+/- kcalloc throughout (chris wright)
+/- simplified export.c (jbfields)
+/- cleaned up mount code
+/- kmem_cache for dentry_info
+/- EBADF on bad caps
+/- fixed stray unaligned access
+/- respond to control-c on slow/hung mount
+
bugs
- premature filejournal trimming?
#include "ceph_debug.h"
#include "super.h"
+/*
+ * Directory operations: lookup, create, link, unlink, rename, etc.
+ */
+
/*
* Ceph MDS operations are specified in terms of a base ino and
* relative path. Thus, the client can specify an operation on a
static int ceph_dentry_revalidate(struct dentry *dentry, struct nameidata *nd);
/*
- * for readdir, encoding the directory frag and offset within that frag
- * into f_pos.
+ * for readdir, we encode the directory frag and offset within that
+ * frag into f_pos.
*/
static unsigned fpos_frag(loff_t p)
{
}
/*
- * Satisfy a readdir by peeking at the dcache. We make this work by
- * carefully ordering dentryes on d_u.d_child when we initially get
- * results back from the MDS, and falling back to a "normal" sync
- * readdir if any dentries in the dir are dropped.
+ * When possible, we try to satisfy a readdir by peeking at the
+ * dcache. We make this work by carefully ordering dentries on
+ * d_u.d_child when we initially get results back from the MDS, and
+ * falling back to a "normal" sync readdir if any dentries in the dir
+ * are dropped.
*
- * I_COMPLETE tells indicates we have all dirs. It is defined IFF we
- * hold the CEPH_CAP_FILE_SHARED (which will be revoked by the MDS
- * if/when the directory is modified).
+ * I_COMPLETE tells indicates we have all dentries in the dir. It is
+ * defined IFF we hold CEPH_CAP_FILE_SHARED (which will be revoked by
+ * the MDS if/when the directory is modified).
*/
static int __dcache_readdir(struct file *filp,
void *dirent, filldir_t filldir)
struct ceph_dentry_info *di;
int err = 0;
+ /* claim ref on last dentry we returned */
last = fi->dentry;
fi->dentry = NULL;
+
dout("__dcache_readdir %p at %llu (last %p)\n", dir, filp->f_pos,
last);
spin_lock(&dcache_lock);
+ /* start at beginning? */
if (filp->f_pos == 2 || (last &&
filp->f_pos < ceph_dentry(last)->offset)) {
if (list_empty(&parent->d_subdirs))
dentry, dentry->d_name.len, dentry->d_name.name, dentry->d_inode);
filp->f_pos = di->offset;
err = filldir(dirent, dentry->d_name.name,
- dentry->d_name.len, di->offset,
- dentry->d_inode->i_ino,
- dentry->d_inode->i_mode >> 12);
+ dentry->d_name.len, di->offset,
+ dentry->d_inode->i_ino,
+ dentry->d_inode->i_mode >> 12);
spin_lock(&inode->i_lock);
spin_lock(&dcache_lock);
if (err < 0) {
- fi->dentry = dentry;
+ fi->dentry = dentry; /* remember our position */
goto out_unlock;
}