Re: [v2] ceph: support getting ceph.dir.rsnaps vxattr

2021-04-09 Thread Yanhu Cao
ping @jeff @Ilya On Fri, Aug 28, 2020 at 9:29 AM Yanhu Cao wrote: > > It's easy to know how many snapshots have been created. > > Link: https://tracker.ceph.com/issues/47168 > Signed-off-by: Yanhu Cao > --- > fs/ceph/inode.c | 1 + > fs/ceph/mds_client.c

[v2] ceph: support getting ceph.dir.rsnaps vxattr

2020-08-27 Thread Yanhu Cao
It's easy to know how many snapshots have been created. Link: https://tracker.ceph.com/issues/47168 Signed-off-by: Yanhu Cao --- fs/ceph/inode.c | 1 + fs/ceph/mds_client.c | 9 - fs/ceph/mds_client.h | 1 + fs/ceph/super.h | 2 +- fs/ceph/xattr.c | 7 +++ 5 files

[PATCH] ceph: support getting ceph.dir.rsnaps vxattr

2020-08-27 Thread Yanhu Cao
It's easy to know how many snapshots have been created. Signed-off-by: Yanhu Cao --- fs/ceph/inode.c | 1 + fs/ceph/mds_client.c | 4 +++- fs/ceph/mds_client.h | 1 + fs/ceph/super.h | 2 +- fs/ceph/xattr.c | 7 +++ 5 files changed, 13 insertions(+), 2 deletions(-) diff

[PATCH] ceph: add column 'mds' to show caps in more user friendly

2020-08-23 Thread Yanhu Cao
In multi-mds, the 'caps' debugfs file will have duplicate ino, add the 'mds' column to indicate which mds session the cap belongs to. Signed-off-by: Yanhu Cao --- fs/ceph/debugfs.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c

Re: [v2] ceph: use frag's MDS in either mode

2020-08-02 Thread Yanhu Cao
On Fri, Jul 31, 2020 at 7:57 PM Jeff Layton wrote: > > On Fri, 2020-07-31 at 16:25 +0800, Yanhu Cao wrote: > > When doing some tests with multiple mds, there are many > > mds forwarding requests between them and then the client request > > is resent. > > > &

[v2] ceph: use frag's MDS in either mode

2020-07-31 Thread Yanhu Cao
is already set, it can be returned directly without the logic behind it. But the current logic doesn't return directly because the condition 'mode == USE_AUTH_MDS', and sometimes frag's mds is not equal to cap's session mds, which then causes the request to be resent. Signed-off-by: Yanhu Cao --- fs/ceph

Re: [PATCH] ceph: use frag's MDS in either mode

2020-07-30 Thread Yanhu Cao
On Fri, Jul 31, 2020 at 12:46 AM Jeff Layton wrote: > > On Thu, 2020-07-30 at 19:22 +0800, Yanhu Cao wrote: > > if frag.mds != cap->session->s_mds, the client's req will be resent. > > > > e.g. > > > > file: mnt/cephfs/dir03/dir003 (0x103) >

[PATCH] ceph: use frag's MDS in either mode

2020-07-30 Thread Yanhu Cao
ceph: __choose_mds ca362c7a 103.fffe frag 0 mds1 (auth) kernel: ceph: __choose_mds ca362c7a 103.fffe mds0 (auth cap 679c38e2) kernel: ceph: __choose_mds using resend_mds mds1 Signed-off-by: Yanhu Cao --- fs/ceph/mds_client.c | 3 +--

[v2] ceph: show max caps in debugfs caps file

2020-05-24 Thread Yanhu Cao
before -- total 1286 avail 1005 used281 reserved0 min 1024 after - total 1286 avail 1005 used281 limit 261 reserved0 min 1024 Signed-off-by: Yanhu Cao Signed-off-by: Yanhu

Re: [PATCH] ceph: show max caps in debugfs caps file

2020-05-22 Thread Yanhu Cao
On Thu, May 21, 2020 at 8:51 PM Jeff Layton wrote: > > On Thu, 2020-05-21 at 20:19 +0800, Yanhu Cao wrote: > > On Thu, May 21, 2020 at 7:09 PM Jeff Layton wrote: > > > On Thu, 2020-05-21 at 17:38 +0800, Yanhu Cao wrote: > > > > before > > &

Re: [PATCH] ceph: show max caps in debugfs caps file

2020-05-21 Thread Yanhu Cao
On Thu, May 21, 2020 at 7:09 PM Jeff Layton wrote: > > On Thu, 2020-05-21 at 17:38 +0800, Yanhu Cao wrote: > > before > > -- > > total 1026 > > avail 1024 > > used2 > >

[PATCH] ceph: show max caps in debugfs caps file

2020-05-21 Thread Yanhu Cao
2048 reserved0 min 1024 Signed-off-by: Yanhu Cao --- fs/ceph/caps.c| 6 -- fs/ceph/debugfs.c | 7 --- fs/ceph/super.h | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index

[PATCH] function dispatch should return if mds session does not exist

2019-10-14 Thread Yanhu Cao
215112] ? max_active_store+0x80/0x80 [5452201.215139] ? kthread_bind+0x10/0x10 [5452201.215167] ret_from_fork+0x1f/0x30 Link: https://tracker.ceph.com/issues/42288 Signed-off-by: Yanhu Cao --- fs/ceph/mds_client.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/f

[PATCH] ceph: kernel client startsync can be removed

2017-07-21 Thread Yanhu Cao
kernel client is still sending write,startsync. that startsync is a no-op (has been for years) and can probably be removed Link: http://tracker.ceph.com/issues/20604 Signed-off-by: Yanhu Cao <gmayy...@gmail.com> --- fs/ceph/addr.c | 9 ++--- fs/ceph/file.c

[PATCH] ceph: kernel client startsync can be removed

2017-07-21 Thread Yanhu Cao
kernel client is still sending write,startsync. that startsync is a no-op (has been for years) and can probably be removed Link: http://tracker.ceph.com/issues/20604 Signed-off-by: Yanhu Cao --- fs/ceph/addr.c | 9 ++--- fs/ceph/file.c | 5 + include/linux/ceph