Re: Ceph hard lock Hammer 9.2

2015-06-24 Thread Yan, Zheng
Could you please run "echo 1 > /proc/sys/kernel/sysrq; echo t > /proc/sysrq-trigger" when this warning happens again. then send the kernel message to us. Regards Yan, Zheng On Tue, Jun 23, 2015 at 10:25 PM, Barclay Jameson wrote: > Sure, > I guess it's actually a

Re: [ceph:for-linus 11/40] fs/ceph/mds_client.c:2865:1-10: second lock on line 2904

2015-07-02 Thread Yan, Zheng
gt; vim +2865 fs/ceph/mds_client.c >> >> a687ecaf John Spray 2014-09-19 2859 >> ceph_session_state_name(session->s_state)); >> 2f2dc053 Sage Weil 2009-10-06 2860 >> 99a9c273 Yan, Zheng 2013-09-22 2861 >> spin_lock(&session->s_gen_ttl_

Re: Client: what is supposed to protect racing readdirs and unlinks?

2015-07-15 Thread Yan, Zheng
27;s not sufficient. > > Is there supposed to be something preventing this kind of race? If not > I can work something out in the code but I've not done much work in > that bit and there are enough pieces that I wonder if I'm missing some > other issue. I think calling (*

Re: CephFS and the next hammer release v0.94.3

2015-08-03 Thread Yan, Zheng
Hi Loic. Yes, https://github.com/ceph/ceph/pull/5222 is problematic. Do you mean should we include these RPs in v0.94.3? These RPs fix a bug in rare configure, I think it’s not a big deal to not include it in v0.94.3 Regards Yan, Zheng > On Aug 4, 2015, at 00:32, Loic Dachary wr

Re: FileStore should not use syncfs(2)

2015-08-06 Thread Yan, Zheng
On Thu, Aug 6, 2015 at 5:26 AM, Sage Weil wrote: > Today I learned that syncfs(2) does an O(n) search of the superblock's > inode list searching for dirty items. I've always assumed that it was > only traversing dirty inodes (e.g., a list of dirty inodes), but that > appears not to be the case, e

Re: [PATCH] ceph: Using file->f_flags rather than flags check O_CREAT.

2015-08-13 Thread Yan, Zheng
if (file->f_flags & O_CREAT) > parent_inode = > ceph_get_dentry_parent_inode(file->f_path.dentry); > err = ceph_mdsc_do_request(mdsc, parent_inode, req); > iput(parent_inode); In this case, we do not need parent_inode because file alread

Re: [PATCH] ceph: Using file->f_flags rather than flags check O_CREAT.

2015-08-13 Thread Yan, Zheng
On Thu, Aug 13, 2015 at 8:34 PM, Sage Weil wrote: > On Thu, 13 Aug 2015, Yan, Zheng wrote: >> On Thu, Aug 13, 2015 at 5:01 PM, Ma, Jianpeng wrote: >> > Because flags removed the O_CREAT, so we should use file->f_flags. >> > >> > Signed-off-by: Jianpen

Re: [PATCH] fs/ceph: No need get inode of parent in ceph_open.

2015-08-17 Thread Yan, Zheng
It seems all of your patches are malformed. please use 'git send-email’ to send patch. Regards Yan, Zheng > On Aug 17, 2015, at 16:43, Ma, Jianpeng wrote: > > For ceph_open, it already get the parent inode. So no need to get again. > > Signed-off-by: Jianpeng Ma > -

Re: [PATCH] fs/ceph: No need get inode of parent in ceph_open.

2015-08-17 Thread Yan, Zheng
request(req); > — I fixed your patches (all tabs are replaced by spaces in your patches) and added them to our testing branch Thanks Yan, Zheng > 2.4.3 > -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] libceph: use keepalive2 to verify the mon session is alive

2015-09-01 Thread Yan, Zheng
Signed-off-by: Yan, Zheng --- include/linux/ceph/libceph.h | 2 ++ include/linux/ceph/messenger.h | 4 +++ include/linux/ceph/msgr.h | 4 ++- net/ceph/ceph_common.c | 18 - net/ceph/messenger.c | 60 ++ net/ceph

Re: [PATCH] libceph: use keepalive2 to verify the mon session is alive

2015-09-02 Thread Yan, Zheng
> On Sep 2, 2015, at 17:12, Ilya Dryomov wrote: > > On Wed, Sep 2, 2015 at 5:22 AM, Yan, Zheng wrote: >> timespec_to_jiffies() does not work this way. it convert time delta in form >> of timespec to time delta in form of jiffies. > > Ah sorry, con->last_keepal

Re: [PATCH] libceph: advertise support for keepalive2

2015-09-15 Thread Yan, Zheng
does not recognize CEPH_MSGR_TAG_KEEPALIVE2 tag). I think it's better to not advertise support for keepalive2. Regards Yan, Zheng > > Signed-off-by: Ilya Dryomov > --- > include/linux/ceph/ceph_features.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/incl

Re: [PATCH] libceph: don't access invalid memory in keepalive2 path

2015-09-15 Thread Yan, Zheng
> + ceph_encode_timespec(&con->out_temp_keepalive2, &now); > + con_out_kvec_add(con, sizeof(con->out_temp_keepalive2), > + &con->out_temp_keepalive2); > } else { > con_out_kvec_add(

Re: [PATCH] libceph: advertise support for keepalive2

2015-09-16 Thread Yan, Zheng
On Wed, Sep 16, 2015 at 3:39 PM, Ilya Dryomov wrote: > On Wed, Sep 16, 2015 at 9:28 AM, Yan, Zheng wrote: >> On Mon, Sep 14, 2015 at 9:51 PM, Ilya Dryomov wrote: >>> We are the client, but advertise keepalive2 anyway - for consistency, >>> if nothing else. In the f

Re: a patch to improve cephfs direct io performance

2015-09-27 Thread Yan, Zheng
pagevlen); > +pages = kmalloc(sizeof(*pages) * npages, GFP_NOFS); > +if (!pages) > +return ERR_PTR(-ENOMEM); > + for (n = 0; n < npages; n += m) { > +m = calc_pages_for((ulong)data, len); > +if (n + m > npages) > +m = npages - n; &g

Re: [PATCH] ceph: fix a comment typo

2015-09-29 Thread Yan, Zheng
ceph virtual inode (id + snaphot) */ > + /* use ceph virtual inode (id + snapshot) */ > klen = sizeof(ci->i_vino); > if (klen > maxbuf) > return 0; Applied, thank you. Yan, Zheng > -- > 1.9.1 > > -- To unsubscribe from this list: send

Re: a patch to improve cephfs direct io performance

2015-09-30 Thread Yan, Zheng
ith each other in the principle. why? I think it's easy to replace dio_alloc_pagev() by iov_iter_get_pages(). We just need to use dio_get_pagevlen() to calculate how many page to get each time. Regards Yan, Zheng > > The patch for the newest kernel branch is below. > > Best Regards >

[BUG] commit "namei: d_is_negative() should be checked before ->d_seq validation" breaks ceph-fuse

2015-09-30 Thread Yan, Zheng
multiple machines. Regards Yan, Zheng-- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] ceph: fix message length computation

2015-10-01 Thread Yan, Zheng
pathlen1 + pathlen2 + 2*(1 + sizeof(u32) + sizeof(u64)) + > - sizeof(struct timespec); > + sizeof(struct ceph_timespec); > > /* calculate (max) length for cap releases */ > len += sizeof(struct ceph_mds_request_release) * > Applied. t

Re: a patch to improve cephfs direct io performance

2015-10-08 Thread Yan, Zheng
0)) { > -ret = n; > +n = len; > +pages = dio_alloc_pagev(from, len, false, &start, > +&num_pages); > +if (IS_ERR(pages)) { > ceph_osdc_put_request(req); > +ret = PTR_ERR(pages); > brea

Re: [PATCH] libceph: introduce ceph_x_authorizer_cleanup()

2015-10-26 Thread Yan, Zheng
ncapsulate > ceph_x_authorizer cleanup and switch to it. This fixes ceph_x_destroy(), > which currently always leaks key and ceph_x_build_authorizer() error > paths. > > Cc: Yan, Zheng > Signed-off-by: Ilya Dryomov > --- > net/ceph/auth_x.c | 28 +-

Re: why package ceph-fuse needs packages ceph?

2015-10-26 Thread Yan, Zheng
On Mon, Oct 26, 2015 at 6:31 PM, Jevon Qiao wrote: > Hi Sage, > > Here comes another question, does ceph-fuse support Unix OS(like HP-UNIX or > AIX)? It supports OSX and FreeBSD. (I tested it a few weeks ago. current development branch may require some minor modification) > > Thanks, > Jevon > >

Re: Only client.admin can mount cephfs by ceph-fuse

2015-11-02 Thread Yan, Zheng
On Mon, Nov 2, 2015 at 12:28 PM, Jaze Lee wrote: > Hello, >I find only ceph.client.admin can mount cephfs. > > [root@ceph-base-0 ceph]# ceph auth get client.cephfs_user > exported keyring for client.cephfs_user > [client.cephfs_user] > key = AQDZ3DZWR7nqBxAAzSoU/yRz1oJsOYdYrTAzcw== > caps mds

Re: [PATCH 0/4] libceph: nocephx_sign_messages option + misc

2015-11-02 Thread Yan, Zheng
ceph_common.c | 18 +- > net/ceph/messenger.c | 32 > net/ceph/osd_client.c | 14 ++++-- > 7 files changed, 53 insertions(+), 53 deletions(-) > Reviewed-by: Yan, Zheng -- To unsubscribe from this list: send the lin

Re: [PATCH] ceph:Fix error handling in the function down_reply

2015-11-09 Thread Yan, Zheng
le32_to_cpu(head->op) == > CEPH_MDS_OP_RMSNAP, > + &realm); > downgrade_write(&mdsc->snap_rwsem); > } else { > down_read(&mdsc->snap_rwsem); > } > + > + if (err) > +

Re: [PATCH] ceph:Fix error handling in the function ceph_readddir_prepopulate

2015-11-09 Thread Yan, Zheng
ceph_fill_dirfrag(d_inode(parent), rinfo->dir_dir); > + if (rinfo->dir_dir) { > + err = ceph_fill_dirfrag(d_inode(parent), > rinfo->dir_dir); > + if (err) > + goto out; > + } >

Re: [PATCH 2/2] fs/ceph: ceph_frag_contains_value can be boolean

2015-11-17 Thread Yan, Zheng
turn (v & ceph_frag_mask(f)) == ceph_frag_value(f); > } > -- > 1.9.1 both applied Thanks Yan, Zheng > > > -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Ceph-fuse single read limitation?‏

2015-11-22 Thread Yan, Zheng
ase this value to see the > performance difference, but are there other options we can try to increase > single read performance? > try setting client_readahead_max_bytes to 4M Yan, Zheng -- To unsubscribe from this list: send the line

Re: Ceph-fuse single read limitation?‏

2015-11-23 Thread Yan, Zheng
ceph client log, we found each read > request's size (ll_read) is limited to 128KB, which should be the limitation > of kernel fuse's FUSE_MAX_PAGES_PER_REQ = 32. We may try to increase this > value to see the performance difference, but are there other options we can > try to i

Re: Compiling for FreeBSD

2015-11-29 Thread Yan, Zheng
without-tcmalloc --without-libaio --without-libxfs gmake I don't know extact list of packages dependencies. But ./configure should tell you what is missing. Yan, Zheng > > > -- > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in > the body of a mess

Re: Compiling for FreeBSD

2015-12-02 Thread Yan, Zheng
see https://github.com/ceph/ceph/pull/6770. The code can be compiled on FreeBSD/OSX, most client programs can connect to ceph servers on Linux. Regards Yan. Zheng On Wed, Dec 2, 2015 at 2:43 AM, Willem Jan Withagen wrote: > On 1-12-2015 19:36, Sage Weil wrote: >> >> On Tue, 1

Re: Compiling for FreeBSD

2015-12-02 Thread Yan, Zheng
On Thu, Dec 3, 2015 at 4:52 AM, Willem Jan Withagen wrote: > On 2-12-2015 15:13, Yan, Zheng wrote: >> see https://github.com/ceph/ceph/pull/6770. The code can be compiled >> on FreeBSD/OSX, most client programs can connect to ceph servers on >> Linux. > > Hi, >

Re: how to see file object-mappings for cephfuse client

2015-12-06 Thread Yan, Zheng
On Mon, Dec 7, 2015 at 10:51 AM, Wuxiangwei wrote: > Hi, Everyone > > Recently I'm trying to figure out how to use ceph-fuse. If we mount cephfs as > the kernel client, there is a 'cephfs' command tool (though it seems to be > 'deprecated') with 'map' and 'show_location' commands to show the RAD

Re: 答复: how to see file object-mappings for cephfuse client

2015-12-07 Thread Yan, Zheng
Tel : 0571-86760875 > 2014 UIS 2, TEAM BORE > > > -邮件原件- > 发件人: Yan, Zheng [mailto:uker...@gmail.com] > 发送时间: 2015年12月7日 11:22 > 收件人: wuxiangwei 09660 (RD) > 抄送: ceph-devel@vger.kernel.org; ceph-us...@lists.ceph.com > 主题: Re: how to see file object-mappin

[PATCH 00/11] Fixes for mds cluster

2014-01-20 Thread Yan, Zheng
://github.com/ceph/ceph-client.git wip-mds-cluster Regards Yan, Zheng -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 07/11] ceph: handle session flush message

2014-01-20 Thread Yan, Zheng
Signed-off-by: Yan, Zheng --- fs/ceph/mds_client.c | 19 +++ fs/ceph/strings.c| 2 ++ include/linux/ceph/ceph_fs.h | 2 ++ 3 files changed, 23 insertions(+) diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 1fd655a..7c00dd5 100644 --- a/fs/ceph

[PATCH 08/11] ceph: remove exported caps when handling cap import message

2014-01-20 Thread Yan, Zheng
Version 3 cap import message includes the ID of the exported caps. It allow us to remove the exported caps if we still haven't received the corresponding cap export message. We remove the exported caps because they are stale, keeping them can compromise consistence. Signed-off-by: Yan,

[PATCH 04/11] ceph: fix trim caps

2014-01-20 Thread Yan, Zheng
- don't trim auth cap if there are flusing caps - don't trim auth cap if any 'write' cap is wanted - allow trimming non-auth cap even if the inode is dirty Signed-off-by: Yan, Zheng --- fs/ceph/mds_client.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deleti

[PATCH 09/11] ceph: add open export target session helper

2014-01-20 Thread Yan, Zheng
Signed-off-by: Yan, Zheng --- fs/ceph/mds_client.c | 51 --- fs/ceph/mds_client.h | 2 ++ 2 files changed, 38 insertions(+), 15 deletions(-) diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 7c00dd5..f4f050a 100644 --- a/fs/ceph

[PATCH 10/11] ceph: add imported caps when handling cap export message

2014-01-20 Thread Yan, Zheng
d-off-by: Yan, Zheng --- fs/ceph/caps.c | 220 fs/ceph/inode.c | 4 +- fs/ceph/super.h | 4 +- 3 files changed, 146 insertions(+), 82 deletions(-) diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 44373dc..18c1dc3 100644 --- a/fs/ceph/c

[PATCH 03/11] ceph: fix cache revoke race

2014-01-20 Thread Yan, Zheng
handle following sequence of events: - non-auth MDS revokes Fc cap. queue invalidate work - auth MDS issues Fc cap through request reply. i_rdcache_gen gets increased. - invalidate work runs. it finds i_rdcache_revoking != i_rdcache_gen, so it does nothing. Signed-off-by: Yan, Zheng --- fs

[PATCH 06/11] ceph: check inode caps in ceph_d_revalidate

2014-01-20 Thread Yan, Zheng
Some inodes in readdir reply may have no caps. Getattr mds request for these inodes can return -ESTALE. The fix is consider dentry that links to inode with no caps as invalid. Invalid dentry causes a lookup request to send to the mds, the MDS will send caps back. Signed-off-by: Yan, Zheng

[PATCH 11/11] libceph: support CEPH_FEATURE_EXPORT_PEER

2014-01-20 Thread Yan, Zheng
Signed-off-by: Yan, Zheng --- include/linux/ceph/ceph_features.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/ceph/ceph_features.h b/include/linux/ceph/ceph_features.h index 5f42e44..d21b34d 100644 --- a/include/linux/ceph/ceph_features.h +++ b/include

[PATCH 02/11] mds: use ceph_seq_cmp() to compare migrate_seq

2014-01-20 Thread Yan, Zheng
Signed-off-by: Yan, Zheng --- fs/ceph/caps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 1012099..2c39d9f 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -628,7 +628,7 @@ retry: cap->cap_id = cap_id; cap->

[PATCH 05/11] ceph: handle -ESTALE reply

2014-01-20 Thread Yan, Zheng
Send requests that operate on path to directory's auth MDS if mode == USE_AUTH_MDS. Always retry using the auth MDS if got -ESTALE reply from non-auth MDS. Also clean up the code that handles auth MDS change. Signed-off-by: Yan, Zheng --- fs/ceph/mds_client.c

[PATCH 01/11] ceph: handle cap export race in try_flush_caps()

2014-01-20 Thread Yan, Zheng
auth cap may change after releasing the i_ceph_lock Signed-off-by: Yan, Zheng --- fs/ceph/caps.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 80dad0d..1012099 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c

Re: [PATCH 08/11] ceph: remove exported caps when handling cap import message

2014-01-20 Thread Yan, Zheng
On 01/21/2014 01:22 PM, Sage Weil wrote: > On Tue, 21 Jan 2014, Yan, Zheng wrote: >> Version 3 cap import message includes the ID of the exported >> caps. It allow us to remove the exported caps if we still haven't >> received the corresponding cap export message. >>

[PATCH 1/5] ceph: properly handle XATTR_CREATE and XATTR_REPLACE

2014-02-10 Thread Yan, Zheng
return -EEXIST if XATTR_CREATE is set and xattr alread exists. return -ENODATA if XATTR_REPLACE is set but xattr does not exist. Signed-off-by: Yan, Zheng --- fs/ceph/xattr.c | 38 ++ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/fs/ceph

[PATCH 5/5] ceph: fix ceph_set_acl()

2014-02-10 Thread Yan, Zheng
If acl is equivalent to file mode permission bits, ceph_set_acl() needs to remove any existing acl xattr. Use __ceph_setxattr() to handle both setting and removing acl xattr cases, it doesn't return -ENODATA when there is no acl xattr. Signed-off-by: Yan, Zheng --- fs/ceph/acl.c | 6 +---

[PATCH 4/5] ceph: add missing init_acl() for mkdir() and atomic_open()

2014-02-10 Thread Yan, Zheng
Signed-off-by: Yan, Zheng --- fs/ceph/dir.c | 9 + fs/ceph/file.c | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 6da4df8..3bbd0eb 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -695,9 +695,8 @@ static int ceph_mknod(struct

[PATCH 2/5] ceph: remove zero-size xattr

2014-02-10 Thread Yan, Zheng
Signed-off-by: Yan, Zheng --- fs/ceph/xattr.c | 9 + 1 file changed, 9 insertions(+) diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c index 28f9793..6ed0e5a 100644 --- a/fs/ceph/xattr.c +++ b/fs/ceph/xattr.c @@ -12,6 +12,9 @@ #define XATTR_CEPH_PREFIX "ceph."

[PATCH 3/5] ceph: fix ceph_removexattr()

2014-02-10 Thread Yan, Zheng
Signed-off-by: Yan, Zheng --- fs/ceph/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c index 6ed0e5a..79f9c12 100644 --- a/fs/ceph/xattr.c +++ b/fs/ceph/xattr.c @@ -463,7 +463,7 @@ static int __remove_xattr(struct ceph_inode_info *ci

Re: [PATCH 2/5] ceph: remove zero-size xattr

2014-02-11 Thread Yan, Zheng
On Tue, Feb 11, 2014 at 10:47 PM, Alex Elder wrote: > On 02/10/2014 11:30 PM, Yan, Zheng wrote: >> Signed-off-by: Yan, Zheng > > You really need to explain better under what circumstances > a zero-size xattr is getting removed. > > But apparently it's only when yo

Re: [PATCH 2/5] ceph: remove zero-size xattr

2014-02-11 Thread Yan, Zheng
On 02/12/2014 01:25 AM, Alex Elder wrote: > On 02/11/2014 09:10 AM, Yan, Zheng wrote: >> On Tue, Feb 11, 2014 at 10:47 PM, Alex Elder wrote: >>> On 02/10/2014 11:30 PM, Yan, Zheng wrote: >>>> Signed-off-by: Yan, Zheng >>> >>> You really need to ex

Re: [PATCH 2/5] ceph: remove zero-size xattr

2014-02-11 Thread Yan, Zheng
On 02/12/2014 10:43 AM, Sage Weil wrote: > On Wed, 12 Feb 2014, Yan, Zheng wrote: >> On 02/12/2014 01:25 AM, Alex Elder wrote: >>> On 02/11/2014 09:10 AM, Yan, Zheng wrote: >>>> On Tue, Feb 11, 2014 at 10:47 PM, Alex Elder wrote: >>>>> On 02/10/2014

[PATCH] ceph: fix __dcache_readdir()

2014-02-13 Thread Yan, Zheng
checking if a given dentry is after the the position of readdir, __dcache_readdir() compares numerical value of frag_t directly. This is wrong, it should use ceph_frag_compare(). Signed-off-by: Yan, Zheng --- fs/ceph/dir.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff

Re: [PATCH 4/5] ceph: add missing init_acl() for mkdir() and atomic_open()

2014-02-13 Thread Yan, Zheng
updated patch --- >From 9c517a5af5af472a0bee9c900b7df400b10f3098 Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Tue, 11 Feb 2014 12:55:05 +0800 Subject: [PATCH 4/5] ceph: add missing init_acl() for mkdir() and atomic_open() Signed-off-by: Yan, Zheng --- fs/cep

Re: [PATCH 4/5] ceph: add missing init_acl() for mkdir() and atomic_open()

2014-02-13 Thread Yan, Zheng
On 02/14/2014 01:46 PM, Guangliang Zhao wrote: > On Tue, Feb 11, 2014 at 01:30:11PM +0800, Yan Zheng wrote: > > This looks good, but there maybe some hiccups, see below. > > The symlink also need ceph_init_acl() as Alex mentioned, I have > add it in the patch. wi

[PATCH] ceph: fix ceph_dir_llseek()

2014-02-27 Thread Yan, Zheng
This doesn't make sense neither. Old_offset should be ceph_make_fpos(fi->frag, fi->next_offset). Signed-off-by: Yan, Zheng --- fs/ceph/dir.c | 12 ++-- fs/ceph/super.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 4

[PATCH] ceph: fix reset_readdir()

2014-02-28 Thread Yan, Zheng
When changing readdir postion, fi->next_offset should be set to 0 if the new postion is not in the first dirfrag. Signed-off-by: Yan, Zheng --- fs/ceph/dir.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index a7eaf96..8ce8833 100

Re: [PATCH] ceph: fix ceph_dir_llseek()

2014-02-28 Thread Yan, Zheng
On Fri, Feb 28, 2014 at 10:05 PM, Alex Elder wrote: > On 02/27/2014 03:07 AM, Yan, Zheng wrote: >> 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->

[PATCH 1/4] ceph: simply ceph_fh_to_dentry()

2014-03-01 Thread Yan, Zheng
MDS handles LOOKUPHASH and LOOKUPINO MDS requests in the same way. So __cfh_to_dentry() is redundant. Signed-off-by: Yan, Zheng --- fs/ceph/export.c | 167 +++ 1 file changed, 32 insertions(+), 135 deletions(-) diff --git a/fs/ceph/export.c b

[PATCH 3/4] ceph: add get_parent() callback for export_operations

2014-03-01 Thread Yan, Zheng
The callback uses LOOKUPPARENT MDS request to find parent. Signed-off-by: Yan, Zheng --- fs/ceph/export.c | 44 1 file changed, 44 insertions(+) diff --git a/fs/ceph/export.c b/fs/ceph/export.c index 017af26..817d370 100644 --- a/fs/ceph/export.c

[PATCH 4/4] ceph: print inode number for LOOKUPINO/LOOKUPPARENT request

2014-03-01 Thread Yan, Zheng
Signed-off-by: Yan, Zheng --- fs/ceph/debugfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c index 6d59006..a9b5103 100644 --- a/fs/ceph/debugfs.c +++ b/fs/ceph/debugfs.c @@ -93,6 +93,8 @@ static int mdsc_show(struct seq_file *s, void *p

[PATCH 2/4] ceph: fix ceph_fh_to_parent()

2014-03-01 Thread Yan, Zheng
ceph_fh_to_parent() finds the inode that corresponds to the 'ino' field of struct ceph_nfs_confh. This is wrong, it should find the inode that corresponds to the 'parent_ino' field. Signed-off-by: Yan, Zheng --- fs/ceph/export.c | 38 +

[PATCH] ceph: let MDS adjust readdir 'frag'

2014-03-02 Thread Yan, Zheng
eaddir 'offset' if the readdir reply is different than the requested one. Signed-off-by: Yan, Zheng --- fs/ceph/dir.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 94b80f4..ff2864a 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -322,9 +3

[PATCH 2/2] ceph: forbid mandatory file lock

2014-03-04 Thread Yan, Zheng
Signed-off-by: Yan, Zheng --- fs/ceph/locks.c | 12 1 file changed, 12 insertions(+) diff --git a/fs/ceph/locks.c b/fs/ceph/locks.c index 133e006..f91a569a 100644 --- a/fs/ceph/locks.c +++ b/fs/ceph/locks.c @@ -87,6 +87,12 @@ int ceph_lock(struct file *file, int cmd, struct

[PATCH 1/2] ceph: fix ceph_flock()

2014-03-04 Thread Yan, Zheng
VFS does not directly pass the flock's operation to the filesystem's flock callback directly. It translates the flock's operation to posix lock's command. Signed-off-by: Yan, Zheng --- fs/ceph/locks.c | 21 + 1 file changed, 9 insertions(+), 12 deletions

Re: [PATCH 2/4] ceph: fix ceph_fh_to_parent()

2014-03-05 Thread Yan, Zheng
On 03/06/2014 01:17 AM, Sage Weil wrote: > On Sat, 1 Mar 2014, Yan, Zheng wrote: >> ceph_fh_to_parent() finds the inode that corresponds to the 'ino' field >> of struct ceph_nfs_confh. This is wrong, it should find the inode that >> corresponds to the 'parent_

[PATCH] ceph: add get_name() NFS export callback

2014-03-06 Thread Yan, Zheng
Set WANT_DENTRY flag for the LOOKUPINO MDS request. The flag makes MDS reply contain dentry trace. Signed-off-by: Yan, Zheng --- fs/ceph/export.c | 45 + fs/ceph/inode.c | 51 ++- 2 files changed, 95

[PATCH][RESEND] vfs: Make __d_materialise_dentry() set the materialised dentry name correctly

2014-03-06 Thread Yan, Zheng
From: David Howells Make __d_materialise_dentry() set the materialised dentry name correctly by flipping the arguments to switch_names(). switch_names() is lazy: if both names are internal to their dentries, it'll overwrite that of the first dentry with that of the second, and won't update that

Re: [PATCH] ceph: add get_name() NFS export callback

2014-03-06 Thread Yan, Zheng
On 03/07/2014 12:45 AM, Sage Weil wrote: > On Thu, 6 Mar 2014, Yan, Zheng wrote: >> Set WANT_DENTRY flag for the LOOKUPINO MDS request. The flag makes >> MDS reply contain dentry trace. >> >> Signed-off-by: Yan, Zheng >&

Re: LOOKUPPARENT

2014-03-06 Thread Yan, Zheng
e this information, or > > - change getcwd to use LOOKUPINO + WANT_DENTRY to make it work. I prefer to change getcwd. The problem of old LOOKUPPARENT semantic is that client can't lock the parent inode in advance, This breaks VFS locking rules for lookup. I added the getcwd fix to h

[PATCH v2 0/5] ceph: fixes for nfs export

2014-03-07 Thread Yan, Zheng
Changes since v1: make ceph_fh_to_parent() use LOOKUPPARENT to find parent dentry. if LOOKUPPARENT fails, retry finding the dentry that corresponds to the 'parent_ino' -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majord...@vger.kernel.org M

[PATCH v2 3/5] ceph: fix ceph_fh_to_parent()

2014-03-07 Thread Yan, Zheng
ceph_fh_to_parent() returns dentry that corresponds to the 'ino' field of struct ceph_nfs_confh. This is wrong, it should return dentry that corresponds to the 'parent_ino' field. Signed-off-by: Yan, Zheng --- fs/ceph/export.c | 42 +

[PATCH v2 2/5] ceph: add get_parent() NFS export callback

2014-03-07 Thread Yan, Zheng
The callback uses LOOKUPPARENT MDS request to find parent. Signed-off-by: Yan, Zheng --- fs/ceph/export.c | 53 + 1 file changed, 53 insertions(+) diff --git a/fs/ceph/export.c b/fs/ceph/export.c index 976d341..3794255 100644 --- a/fs/ceph

[PATCH v2 1/5] ceph: simplify ceph_fh_to_dentry()

2014-03-07 Thread Yan, Zheng
MDS handles LOOKUPHASH and LOOKUPINO MDS requests in the same way. So __cfh_to_dentry() is redundant. Signed-off-by: Yan, Zheng --- fs/ceph/export.c | 167 +++ 1 file changed, 32 insertions(+), 135 deletions(-) diff --git a/fs/ceph/export.c b

[PATCH v2 5/5] ceph: print inode number for LOOKUPINO request

2014-03-07 Thread Yan, Zheng
Signed-off-by: Yan, Zheng --- fs/ceph/debugfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c index 8c6f313..16b54aa 100644 --- a/fs/ceph/debugfs.c +++ b/fs/ceph/debugfs.c @@ -93,6 +93,8 @@ static int mdsc_show(struct seq_file *s, void *p

[PATCH v2 4/5] ceph: add get_name() NFS export callback

2014-03-07 Thread Yan, Zheng
Set WANT_DENTRY flag for the LOOKUPINO MDS request. The flag makes MDS reply contain dentry trace. Signed-off-by: Yan, Zheng --- fs/ceph/export.c | 45 + fs/ceph/inode.c | 51 ++- 2 files changed, 95

Re: [PATCH v2 0/5] ceph: fixes for nfs export

2014-03-07 Thread Yan, Zheng
how about the below patch and corresponding mds change in https://github.com/ceph/ceph/commit/617ce6761edd7264893f3638c33fd229c71751a0 Regards Yan, Zheng --- >From 0fa1971741b1d3c236ee6fa3a7feb5a74fbd7f2f Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Thu, 6 Mar 2014 16:40:32

[PATCH] ceph: make sure write caps are registered with auth MDS

2014-03-07 Thread Yan, Zheng
Only auth MDS can't issue write caps to clients, so don't consider write caps registered with non-auth MDS as valid. Signed-off-by: Yan, Zheng --- fs/ceph/caps.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 1754338..d9ef

[PATCH] ceph: update i_max_size even if inode version does not change

2014-03-09 Thread Yan, Zheng
e in 'open' request reply is equal to the cached inode's version. - client requests new max size. The MDS ignores the request because it does not affect client's write range Signed-off-by: Yan, Zheng --- fs/ceph/inode.c | 16 1 file changed, 8 insertio

[PATCH] ceph: use fl->fl_file as owner identifier of flock and posix lock

2014-03-09 Thread Yan, Zheng
id_namespace' into consideration when checking conflict locks. Signed-off-by: Yan, Zheng --- fs/ceph/locks.c | 44 include/linux/ceph/ceph_fs.h | 4 ++-- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/fs/ceph/loc

Re: [PATCH v2 0/5] ceph: fixes for nfs export

2014-03-09 Thread Yan, Zheng
On 03/10/2014 09:43 AM, Sage Weil wrote: > On Sat, 8 Mar 2014, Yan, Zheng wrote: >> how about the below patch and corresponding mds change in >> https://github.com/ceph/ceph/commit/617ce6761edd7264893f3638c33fd229c71751a0 > > I like this better, thanks! > > O

Re: [PATCH v2 0/5] ceph: fixes for nfs export

2014-03-09 Thread Yan, Zheng
On 03/10/2014 09:49 AM, Sage Weil wrote: > On Sat, 8 Mar 2014, Yan, Zheng wrote: >> how about the below patch and corresponding mds change in >> https://github.com/ceph/ceph/commit/617ce6761edd7264893f3638c33fd229c71751a0 >> >> Regards >&

Re: [PATCH v2 0/5] ceph: fixes for nfs export

2014-03-09 Thread Yan, Zheng
On 03/10/2014 12:12 PM, Sage Weil wrote: > On Mon, 10 Mar 2014, Yan, Zheng wrote: >> On 03/10/2014 09:49 AM, Sage Weil wrote: >>> On Sat, 8 Mar 2014, Yan, Zheng wrote: >>>> how about the below patch and corresponding mds change in >>&g

Re: [PATCH] ceph: use fl->fl_file as owner identifier of flock and posix lock

2014-03-09 Thread Yan, Zheng
On 03/10/2014 12:21 PM, Sage Weil wrote: > On Mon, 10 Mar 2014, Yan, Zheng wrote: >> 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 in most

Re: [PATCH] ceph: use fl->fl_file as owner identifier of flock and posix lock

2014-03-09 Thread Yan, Zheng
On 03/10/2014 12:42 PM, Sage Weil wrote: > On Mon, 10 Mar 2014, Yan, Zheng wrote: >> On 03/10/2014 12:21 PM, Sage Weil wrote: >>> On Mon, 10 Mar 2014, Yan, Zheng wrote: >>>> flock and posix lock should use fl->fl_file instead of process ID >>>> as ow

[PATCH v2] ceph: use fl->fl_file as owner identifier of flock and posix lock

2014-03-10 Thread Yan, Zheng
the flock code to not take the 'pid_namespace' into consideration when checking conflict locks. Signed-off-by: Yan, Zheng --- fs/ceph/locks.c | 62 ++-- fs/ceph/super.c | 1 + fs/ceph/super.h | 1 + include/lin

[PATCH v3] ceph: use fl->fl_file as owner identifier of flock and posix lock

2014-03-10 Thread Yan, Zheng
x27; 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 --- fs/ceph/locks.c | 61 +

Re: nfs tests

2014-03-13 Thread Yan, Zheng
On 03/14/2014 08:44 AM, Sage Weil wrote: > Hey Zheng, > > What workloads have you been testing against NFS? kernel build, fsstress, dbench, blogbench. Regards Yan, Zheng Do you mind adding them > to the knfs tests in ceph-qa-suite? I suggest we add anything that you >

[PATCH] libceph: fix oops in ceph_msg_data_pagelist_advance()

2014-03-22 Thread Yan, Zheng
When there is no more data, ceph_msg_data_pagelist_advance() should not move on to the next page. Signed-off-by: Yan, Zheng --- net/ceph/messenger.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 30efc5c..8859f2e 100644 --- a/net/ceph

[PATCH] libceph: fix oops in ceph_msg_data_{pages,pagelist}_advance()

2014-03-22 Thread Yan, Zheng
When there is no more data, ceph_msg_data_{pages,pagelist}_advance() should not move on to the next page. Signed-off-by: Yan, Zheng --- net/ceph/messenger.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 30efc5c..4f55f9c 100644 --- a

Re: [PATCH] libceph: fix oops in ceph_msg_data_pagelist_advance()

2014-03-22 Thread Yan, Zheng
On Sun, Mar 23, 2014 at 7:10 AM, Alex Elder wrote: > On 03/22/2014 05:54 PM, Yan, Zheng wrote: >> When there is no more data, ceph_msg_data_pagelist_advance() should >> not move on to the next page. > > Without looking very hard at this, this looks right. > Does ceph_msg_d

[PATCH] ceph: fix null pointer dereference in discard_cap_releases()

2014-03-23 Thread Yan, Zheng
send_mds_reconnect() may call discard_cap_releases() after all release messages have been dropped by cleanup_cap_releases() Signed-off-by: Yan, Zheng --- fs/ceph/mds_client.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/fs/ceph/mds_client.c b/fs

[PATCH] ceph: check buffer size in ceph_vxattrcb_layout()

2014-03-23 Thread Yan, Zheng
Signed-off-by: Yan, Zheng --- fs/ceph/xattr.c | 34 +- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c index 2dbd668..28549d5 100644 --- a/fs/ceph/xattr.c +++ b/fs/ceph/xattr.c @@ -64,32 +64,48 @@ static bool

[PATCH] ceph: don't include ceph.{file,dir}.layout vxattr in listxattr()

2014-03-24 Thread Yan, Zheng
This avoids 'cp -a' modifying layout of new files/directories. Signed-off-by: Yan, Zheng --- fs/ceph/xattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c index 28549d5..c9c2b88 100644 --- a/fs/ceph/xattr.c +++ b/fs/ce

Re: ceph-0.77-900.gce9bfb8 Testing Rados EC/Tiering & CephFS ...

2014-03-25 Thread Yan, Zheng
es 18 minutes. After this operation the MDS uses ~10 GB of >> memory (10k per directory for one entry). > > Hmm. That's more than I would expect, but not impossibly so if the MDS > was having trouble keeping the relevant directories in-memory. We have > not done any optimizati

Re: Directory listing issue in testing branch

2014-03-28 Thread Yan, Zheng
fix this issue --- >From 15a26a1d78f24a4a83a2ee319ad10701eb68cd56 Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Sat, 29 Mar 2014 13:41:15 +0800 Subject: [PATCH] ceph: preallocate buffer for readdir reply Preallocate buffer for readdir reply. Limit number of entries in readdir

[PATCH] ceph: preallocate buffer for readdir reply

2014-03-29 Thread Yan, Zheng
Preallocate buffer for readdir reply. Limit number of entries in readdir reply according to the buffer size. Signed-off-by: Yan, Zheng --- fs/ceph/dir.c| 10 fs/ceph/mds_client.c | 66 fs/ceph/mds_client.h | 4 +++- 3 files

  1   2   3   4   5   6   7   8   >