diff options
author | Sage Weil <sage@newdream.net> | 2010-03-01 18:16:56 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-03-01 18:28:02 -0500 |
commit | e9964c102312967a4bc1fd501cb628c4a3b19034 (patch) | |
tree | 7bccb0c4e29d94baaf8c30e008ec5aebdccf9c57 /fs/ceph/super.h | |
parent | 7af8f1e4aa86720840d3318e4dc225c3c7e5a6d0 (diff) |
ceph: fix flush_dirty_caps race with caps migration
The flush_dirty_caps() used to loop over the first entry of the cap_dirty
dirty list on the assumption that after calling ceph_check_caps() it would
be removed from the list. This isn't true for caps that are being
migrated between MDSs, where we've received the EXPORT but not the IMPORT.
Instead, do a safe list iteration, and pin the next inode on the list via
the CEPH_I_NOFLUSH flag.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r-- | fs/ceph/super.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index ff7aaa32736c..6a778f2c3f6e 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h | |||
@@ -289,6 +289,7 @@ struct ceph_inode_xattrs_info { | |||
289 | #define CEPH_I_COMPLETE 1 /* we have complete directory cached */ | 289 | #define CEPH_I_COMPLETE 1 /* we have complete directory cached */ |
290 | #define CEPH_I_NODELAY 4 /* do not delay cap release */ | 290 | #define CEPH_I_NODELAY 4 /* do not delay cap release */ |
291 | #define CEPH_I_FLUSH 8 /* do not delay flush of dirty metadata */ | 291 | #define CEPH_I_FLUSH 8 /* do not delay flush of dirty metadata */ |
292 | #define CEPH_I_NOFLUSH 16 /* do not flush dirty caps */ | ||
292 | 293 | ||
293 | struct ceph_inode_info { | 294 | struct ceph_inode_info { |
294 | struct ceph_vino i_vino; /* ceph ino + snap */ | 295 | struct ceph_vino i_vino; /* ceph ino + snap */ |