Revision tags: v4.1-rc7, v4.1-rc6, v4.1-rc5, v4.1-rc4 |
|
#
745a8e3b |
| 14-May-2015 |
Yan, Zheng <zyan@redhat.com> |
ceph: don't pre-allocate space for cap release messages
Previously we pre-allocate cap release messages for each caps. This wastes lots of memory when there are large amount of caps. This patch make
ceph: don't pre-allocate space for cap release messages
Previously we pre-allocate cap release messages for each caps. This wastes lots of memory when there are large amount of caps. This patch make the code not pre-allocate the cap release messages. Instead, we add the corresponding ceph_cap struct to a list when releasing a cap. Later when flush cap releases is needed, we allocate the cap release messages dynamically.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
show more ...
|
Revision tags: v4.1-rc3, v4.1-rc2 |
|
#
86056090 |
| 01-May-2015 |
Yan, Zheng <zyan@redhat.com> |
ceph: avoid sending unnessesary FLUSHSNAP message
when a snap notification contains no new snapshot, we can avoid sending FLUSHSNAP message to MDS. But we still need to create cap_snap in some case
ceph: avoid sending unnessesary FLUSHSNAP message
when a snap notification contains no new snapshot, we can avoid sending FLUSHSNAP message to MDS. But we still need to create cap_snap in some case because it's required by write path and page writeback path
Signed-off-by: Yan, Zheng <zyan@redhat.com>
show more ...
|
#
7b06a826 |
| 30-Apr-2015 |
Yan, Zheng <zyan@redhat.com> |
ceph: use empty snap context for uninline_data and get_pool_perm
Cached_context in ceph_snap_realm is directly accessed by uninline_data() and get_pool_perm(). This is racy in theory. both uninline_
ceph: use empty snap context for uninline_data and get_pool_perm
Cached_context in ceph_snap_realm is directly accessed by uninline_data() and get_pool_perm(). This is racy in theory. both uninline_data() and get_pool_perm() do not modify existing object, they only create new object. So we can pass the empty snap context to them. Unlike cached_context in ceph_snap_realm, we do not need to protect the empty snap context.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
show more ...
|
#
10183a69 |
| 27-Apr-2015 |
Yan, Zheng <zyan@redhat.com> |
ceph: check OSD caps before read/write
Signed-off-by: Yan, Zheng <zyan@redhat.com>
|
Revision tags: v4.1-rc1, v4.0, v4.0-rc7, v4.0-rc6, v4.0-rc5, v4.0-rc4, v4.0-rc3 |
|
#
e1eba3ea |
| 03-Mar-2015 |
Fabian Frederick <fabf@skynet.be> |
ceph: remove redundant declaration
ceph_aops was already defined extern in addr.c section
Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Yan, Zheng <zyan@redhat.com>
|
#
e2c3de04 |
| 04-Mar-2015 |
Yan, Zheng <zyan@redhat.com> |
ceph: fix dcache/nocache mount option
Signed-off-by: Yan, Zheng <zyan@redhat.com>
|
Revision tags: v4.0-rc2, v4.0-rc1, v3.19, v3.19-rc7, v3.19-rc6, v3.19-rc5 |
|
#
38c48b5f |
| 13-Jan-2015 |
Yan, Zheng <zyan@redhat.com> |
ceph: provide seperate {inode,file}_operations for snapdir
remove all unsupported operations from {inode,file}_operations.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
|
Revision tags: v3.19-rc4, v3.19-rc3, v3.19-rc2 |
|
#
982d6011 |
| 23-Dec-2014 |
Yan, Zheng <zyan@redhat.com> |
ceph: improve reference tracking for snaprealm
When snaprealm is created, its initial reference count is zero. But in some rare cases, the newly created snaprealm is not referenced by anyone. This c
ceph: improve reference tracking for snaprealm
When snaprealm is created, its initial reference count is zero. But in some rare cases, the newly created snaprealm is not referenced by anyone. This causes snaprealm with zero reference count not freed.
The fix is set reference count of newly snaprealm to 1. The reference is return the function who requests to create the snaprealm. When the function finishes its job, it releases the reference.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
show more ...
|
Revision tags: v3.19-rc1, v3.18, v3.18-rc7, v3.18-rc6, v3.18-rc5 |
|
#
e20d258d |
| 14-Nov-2014 |
Yan, Zheng <zyan@redhat.com> |
ceph: flush inline version
After converting inline data to normal data, client need to flush the new i_inline_version (CEPH_INLINE_NONE) to MDS. This commit makes cap messages (sent to MDS) contain
ceph: flush inline version
After converting inline data to normal data, client need to flush the new i_inline_version (CEPH_INLINE_NONE) to MDS. This commit makes cap messages (sent to MDS) contain inline_version and inline_data. Client always converts inline data to normal data before data write, so the inline data length part is always zero.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
show more ...
|
#
28127bdd |
| 14-Nov-2014 |
Yan, Zheng <zyan@redhat.com> |
ceph: convert inline data to normal data before data write
Before any data write, convert inline data to normal data and set i_inline_version to CEPH_INLINE_NONE. The OSD request that saves inline d
ceph: convert inline data to normal data before data write
Before any data write, convert inline data to normal data and set i_inline_version to CEPH_INLINE_NONE. The OSD request that saves inline data to object contains 3 operations (CMPXATTR, WRITE and SETXATTR). It compares a xattr named 'inline_version' to prevent old data overwrites newer data.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
show more ...
|
#
01deead0 |
| 14-Nov-2014 |
Yan, Zheng <zyan@redhat.com> |
ceph: use getattr request to fetch inline data
Add a new parameter 'locked_page' to ceph_do_getattr(). If inline data in getattr reply will be copied to the page.
Signed-off-by: Yan, Zheng <zyan@re
ceph: use getattr request to fetch inline data
Add a new parameter 'locked_page' to ceph_do_getattr(). If inline data in getattr reply will be copied to the page.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
show more ...
|
#
31c542a1 |
| 14-Nov-2014 |
Yan, Zheng <zyan@redhat.com> |
ceph: add inline data to pagecache
Request reply and cap message can contain inline data. add inline data to the page cache if there is Fc cap.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
|
Revision tags: v3.18-rc4 |
|
#
97c85a82 |
| 06-Nov-2014 |
Yan, Zheng <zyan@redhat.com> |
ceph: introduce global empty snap context
Current snaphost code does not properly handle moving inode from one empty snap realm to another empty snap realm. After changing inode's snap realm, some d
ceph: introduce global empty snap context
Current snaphost code does not properly handle moving inode from one empty snap realm to another empty snap realm. After changing inode's snap realm, some dirty pages' snap context can be not equal to inode's i_head_snap. This can trigger BUG() in ceph_put_wrbuffer_cap_refs()
The fix is introduce a global empty snap context for all empty snap realm. This avoids triggering the BUG() for filesystem with no snapshot.
Fixes: http://tracker.ceph.com/issues/9928
Signed-off-by: Yan, Zheng <zyan@redhat.com> Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
show more ...
|
Revision tags: v3.18-rc3, v3.18-rc2 |
|
#
70db4f36 |
| 21-Oct-2014 |
Yan, Zheng <zyan@redhat.com> |
ceph: introduce a new inode flag indicating if cached dentries are ordered
After creating/deleting/renaming file, offsets of sibling dentries may change. So we can not use cached dentries to satisfy
ceph: introduce a new inode flag indicating if cached dentries are ordered
After creating/deleting/renaming file, offsets of sibling dentries may change. So we can not use cached dentries to satisfy readdir. But we can still use the cached dentries to conclude -ENOENT for lookup.
This patch introduces a new inode flag indicating if child dentries are ordered. The flag is set at the same time marking a directory complete. After creating/deleting/renaming file, we clear the flag on directory inode. This prevents ceph_readdir() from using cached dentries to satisfy readdir syscall.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
show more ...
|
Revision tags: v3.18-rc1, v3.17, v3.17-rc7, v3.17-rc6, v3.17-rc5 |
|
#
14ed9703 |
| 12-Sep-2014 |
John Spray <john.spray@redhat.com> |
ceph: additional debugfs output
MDS session state and client global ID is useful instrumentation when testing.
Signed-off-by: John Spray <john.spray@redhat.com>
|
#
b1ee94aa |
| 16-Sep-2014 |
Yan, Zheng <zyan@redhat.com> |
ceph: include the initial ACL in create/mkdir/mknod MDS requests
Current code set new file/directory's initial ACL in a non-atomic manner. Client first sends request to MDS to create new file/direct
ceph: include the initial ACL in create/mkdir/mknod MDS requests
Current code set new file/directory's initial ACL in a non-atomic manner. Client first sends request to MDS to create new file/directory, then set the initial ACL after the new file/directory is successfully created.
The fix is include the initial ACL in create/mkdir/mknod MDS requests. So MDS can handle creating file/directory and setting the initial ACL in one request.
Signed-off-by: Yan, Zheng <zyan@redhat.com> Reviewed-by: Sage Weil <sage@redhat.com>
show more ...
|
#
508b32d8 |
| 16-Sep-2014 |
Yan, Zheng <zyan@redhat.com> |
ceph: request xattrs if xattr_version is zero
Following sequence of events can happen. - Client releases an inode, queues cap release message. - A 'lookup' reply brings the same inode back, but
ceph: request xattrs if xattr_version is zero
Following sequence of events can happen. - Client releases an inode, queues cap release message. - A 'lookup' reply brings the same inode back, but the reply doesn't contain xattrs because MDS didn't receive the cap release message and thought client already has up-to-data xattrs.
The fix is force sending a getattr request to MDS if xattrs_version is 0. The getattr mask is set to CEPH_STAT_CAP_XATTR, so MDS knows client does not have xattr.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
show more ...
|
Revision tags: v3.17-rc4, v3.17-rc3, v3.17-rc2, v3.17-rc1, v3.16, v3.16-rc7, v3.16-rc6, v3.16-rc5, v3.16-rc4, v3.16-rc3, v3.16-rc2, v3.16-rc1, v3.15, v3.15-rc8, v3.15-rc7, v3.15-rc6, v3.15-rc5, v3.15-rc4, v3.15-rc3, v3.15-rc2 |
|
#
d9df2783 |
| 17-Apr-2014 |
Yan, Zheng <zheng.z.yan@intel.com> |
ceph: pre-allocate ceph_cap struct for ceph_add_cap()
So that ceph_add_cap() can be used while i_ceph_lock is locked. This simplifies the code that handle cap import/export.
Signed-off-by: Yan, Zhe
ceph: pre-allocate ceph_cap struct for ceph_add_cap()
So that ceph_add_cap() can be used while i_ceph_lock is locked. This simplifies the code that handle cap import/export.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
show more ...
|
#
0a8a70f9 |
| 14-Apr-2014 |
Yan, Zheng <zheng.z.yan@intel.com> |
ceph: clear directory's completeness when creating file
When creating a file, ceph_set_dentry_offset() puts the new dentry at the end of directory's d_subdirs, then set the dentry's offset based on
ceph: clear directory's completeness when creating file
When creating a file, ceph_set_dentry_offset() puts the new dentry at the end of directory's d_subdirs, then set the dentry's offset based on directory's max offset. The offset does not reflect the real postion of the dentry in directory. Later readdir reply from MDS may change the dentry's position/offset. This inconsistency can cause missing/duplicate entries in readdir result if readdir is partly satisfied by dcache_readdir().
The fix is clear directory's completeness after creating/renaming file. It prevents later readdir from using dcache_readdir().
Fixes: http://tracker.ceph.com/issues/8025 Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com> Reviewed-by: Sage Weil <sage@inktank.com>
show more ...
|
Revision tags: v3.15-rc1, v3.14, v3.14-rc8, v3.14-rc7, v3.14-rc6 |
|
#
eb13e832 |
| 09-Mar-2014 |
Yan, Zheng <zheng.z.yan@intel.com> |
ceph: use fl->fl_file as owner identifier of flock and posix lock
flock and posix lock should use fl->fl_file instead of process ID as owner identifier. (posix lock uses fl->fl_owner. fl->fl_owner i
ceph: use fl->fl_file as owner identifier of flock and posix lock
flock and posix lock should use fl->fl_file instead of process ID as owner identifier. (posix lock uses fl->fl_owner. fl->fl_owner is usually equal to fl->fl_file, but it also can be a customized value). The process ID of who holds the lock is just for F_GETLK fcntl(2).
The fix is rename the 'pid' fields of struct ceph_mds_request_args and struct ceph_filelock to 'owner', rename 'pid_namespace' fields to 'pid'. Assign fl->fl_file to the 'owner' field of lock messages. We also set the most significant bit of the 'owner' field. MDS can use that bit to distinguish between old and new clients.
The MDS counterpart of this patch modifies the flock code to not take the 'pid_namespace' into consideration when checking conflict locks.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com> Reviewed-by: Sage Weil <sage@inktank.com>
show more ...
|
Revision tags: v3.14-rc5 |
|
#
f0494206 |
| 27-Feb-2014 |
Yan, Zheng <zheng.z.yan@intel.com> |
ceph: fix ceph_dir_llseek()
Comparing offset with inode->i_sb->s_maxbytes doesn't make sense for directory. For a fragmented directory, offset (frag_t, off) can be larger than inode->i_sb->s_maxbyte
ceph: fix ceph_dir_llseek()
Comparing offset with inode->i_sb->s_maxbytes doesn't make sense for directory. For a fragmented directory, offset (frag_t, off) can be larger than inode->i_sb->s_maxbytes.
At the very beginning of ceph_dir_llseek(), local variable old_offset is initialized to parameter offset. This doesn't make sense neither. Old_offset should be ceph_make_fpos(fi->frag, fi->next_offset).
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com> Reviewed-by: Alex Elder <elder@linaro.org>
show more ...
|
Revision tags: v3.14-rc4, v3.14-rc3 |
|
#
c969d9bf |
| 16-Feb-2014 |
Guangliang Zhao <lucienchao@gmail.com> |
ceph: make ceph_forget_all_cached_acls() static inline
Signed-off-by: Guangliang Zhao <lucienchao@gmail.com> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Sage Weil <sage@inktank.com>
|
Revision tags: v3.14-rc2, v3.14-rc1 |
|
#
32d35d44 |
| 30-Jan-2014 |
Peter Rosin <peda@lysator.liu.se> |
ceph: remove duplicate declaration of ceph_setattr
Signed-off-by: Peter Rosin <peda@lysator.liu.se> Signed-off-by: Sage Weil <sage@inktank.com>
|
#
72466d0b |
| 29-Jan-2014 |
Sage Weil <sage@inktank.com> |
ceph: fix posix ACL hooks
The merge of commit 7221fe4c2ed7 ("ceph: add acl for cephfs") raced with upstream changes in the generic POSIX ACL code (eg commit 2aeccbe957d0 "fs: add generic xattr_acl h
ceph: fix posix ACL hooks
The merge of commit 7221fe4c2ed7 ("ceph: add acl for cephfs") raced with upstream changes in the generic POSIX ACL code (eg commit 2aeccbe957d0 "fs: add generic xattr_acl handlers" and others).
Some of the fallout was fixed in commit 4db658ea0ca ("ceph: Fix up after semantic merge conflict"), but it was incomplete: the set_acl inode_operation wasn't getting set, and the prototype needed to be adjusted a bit (it doesn't take a dentry anymore).
Signed-off-by: Sage Weil <sage@inktank.com> Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|
#
4db658ea |
| 28-Jan-2014 |
Linus Torvalds <torvalds@linux-foundation.org> |
ceph: Fix up after semantic merge conflict
The previous ceph-client merge resulted in ceph not even building, because there was a merge conflict that wasn't visible as an actual data conflict: commi
ceph: Fix up after semantic merge conflict
The previous ceph-client merge resulted in ceph not even building, because there was a merge conflict that wasn't visible as an actual data conflict: commit 7221fe4c2ed7 ("ceph: add acl for cephfs") added support for POSIX ACL's into Ceph, but unluckily we also had the VFS tree change a lot of the POSIX ACL helper functions to be much more helpful to filesystems (see for example commits 2aeccbe957d0 "fs: add generic xattr_acl handlers", 5bf3258fd2ac "fs: make posix_acl_chmod more useful" and 37bc15392a23 "fs: make posix_acl_create more useful")
The reason this conflict wasn't obvious was many-fold: because it was a semantic conflict rather than a data conflict, it wasn't visible in the git merge as a conflict. And because the VFS tree hadn't been in linux-next, people hadn't become aware of it that way. And because I was at jury duty this morning, I was using my laptop and as a result not doing constant "allmodconfig" builds.
Anyway, this fixes the build and generally removes a fair chunk of the Ceph POSIX ACL support code, since the improved helpers seem to match really well for Ceph too. But I don't actually have any way to *test* the end result, and I was really hoping for some ACK's for this. Oh, well.
Not compiling certainly doesn't make things easier to test, so I'm committing this without the acks after having waited for four hours... Plus it's what I would have done for the merge had I noticed the semantic conflict..
Reported-by: Dave Jones <davej@redhat.com> Cc: Sage Weil <sage@inktank.com> Cc: Guangliang Zhao <lucienchao@gmail.com> Cc: Li Wang <li.wang@ubuntykylin.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|