dir.c (dc3f4198eac14e52a98dfc79cd84b45e280f59cd) dir.c (a319bf56a617354e62cf5f774d2ca4e1a8a3bff3)
1#include <linux/ceph/ceph_debug.h>
2
3#include <linux/spinlock.h>
4#include <linux/fs_struct.h>
5#include <linux/namei.h>
6#include <linux/slab.h>
7#include <linux/sched.h>
8

--- 147 unchanged lines hidden (view full) ---

156 d_unhashed(dentry) ? "!hashed" : "hashed",
157 parent->d_subdirs.prev, parent->d_subdirs.next);
158 if (p == &parent->d_subdirs) {
159 fi->flags |= CEPH_F_ATEND;
160 goto out_unlock;
161 }
162 spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED);
163 if (di->lease_shared_gen == shared_gen &&
1#include <linux/ceph/ceph_debug.h>
2
3#include <linux/spinlock.h>
4#include <linux/fs_struct.h>
5#include <linux/namei.h>
6#include <linux/slab.h>
7#include <linux/sched.h>
8

--- 147 unchanged lines hidden (view full) ---

156 d_unhashed(dentry) ? "!hashed" : "hashed",
157 parent->d_subdirs.prev, parent->d_subdirs.next);
158 if (p == &parent->d_subdirs) {
159 fi->flags |= CEPH_F_ATEND;
160 goto out_unlock;
161 }
162 spin_lock_nested(&dentry->d_lock, DENTRY_D_LOCK_NESTED);
163 if (di->lease_shared_gen == shared_gen &&
164 simple_positive(dentry) &&
164 !d_unhashed(dentry) && d_really_is_positive(dentry) &&
165 ceph_snap(d_inode(dentry)) != CEPH_SNAPDIR &&
166 ceph_ino(d_inode(dentry)) != CEPH_INO_CEPH &&
167 fpos_cmp(ctx->pos, di->offset) <= 0)
168 break;
169 dout(" skipping %p %pd at %llu (%llu)%s%s\n", dentry,
170 dentry, di->offset,
171 ctx->pos, d_unhashed(dentry) ? " unhashed" : "",
172 !d_inode(dentry) ? " null" : "");

--- 1081 unchanged lines hidden (view full) ---

1254 do {
1255 ceph_mdsc_get_request(req);
1256 spin_unlock(&ci->i_unsafe_lock);
1257
1258 dout("dir_fsync %p wait on tid %llu (until %llu)\n",
1259 inode, req->r_tid, last_tid);
1260 if (req->r_timeout) {
1261 unsigned long time_left = wait_for_completion_timeout(
165 ceph_snap(d_inode(dentry)) != CEPH_SNAPDIR &&
166 ceph_ino(d_inode(dentry)) != CEPH_INO_CEPH &&
167 fpos_cmp(ctx->pos, di->offset) <= 0)
168 break;
169 dout(" skipping %p %pd at %llu (%llu)%s%s\n", dentry,
170 dentry, di->offset,
171 ctx->pos, d_unhashed(dentry) ? " unhashed" : "",
172 !d_inode(dentry) ? " null" : "");

--- 1081 unchanged lines hidden (view full) ---

1254 do {
1255 ceph_mdsc_get_request(req);
1256 spin_unlock(&ci->i_unsafe_lock);
1257
1258 dout("dir_fsync %p wait on tid %llu (until %llu)\n",
1259 inode, req->r_tid, last_tid);
1260 if (req->r_timeout) {
1261 unsigned long time_left = wait_for_completion_timeout(
1262 &req->r_safe_completion,
1263 req->r_timeout);
1262 &req->r_safe_completion,
1263 ceph_timeout_jiffies(req->r_timeout));
1264 if (time_left > 0)
1265 ret = 0;
1266 else
1267 ret = -EIO; /* timed out */
1268 } else {
1269 wait_for_completion(&req->r_safe_completion);
1270 }
1271 ceph_mdsc_put_request(req);

--- 140 unchanged lines hidden ---
1264 if (time_left > 0)
1265 ret = 0;
1266 else
1267 ret = -EIO; /* timed out */
1268 } else {
1269 wait_for_completion(&req->r_safe_completion);
1270 }
1271 ceph_mdsc_put_request(req);

--- 140 unchanged lines hidden ---