ceph: encode inodes' parent/d_name in cap reconnect message
authorYan, Zheng <zyan@redhat.com>
Tue, 11 Aug 2020 07:23:03 +0000 (15:23 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 12 Oct 2020 13:29:25 +0000 (15:29 +0200)
commita33f6432b3a63a4909dbbb0967f7c9df8ff2de91
tree690e1883f90f6d234b4ec6d9b5205466d65b6dc4
parentbbf5c979011a099af5dc76498918ed7df445635b
ceph: encode inodes' parent/d_name in cap reconnect message

Since nautilus, MDS tracks dirfrags whose child inodes have caps in open
file table. When MDS recovers, it prefetches all of these dirfrags. This
avoids using backtrace to load inodes. But dirfrags prefetch may load
lots of useless inodes into cache, and make MDS run out of memory.

Recent MDS adds an option that disables dirfrags prefetch. When dirfrags
prefetch is disabled. Recovering MDS only prefetches corresponding dir
inodes. Including inodes' parent/d_name in cap reconnect message can
help MDS to load inodes into its cache.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/mds_client.c