Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ceph: remove dentry_lru file from debugfs

The file shows all dentries in cephfs mount. It's not very useful.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>

authored by

Yan, Zheng and committed by
Ilya Dryomov
8d9c0906 32f6511a

-27
-27
fs/ceph/debugfs.c
··· 139 139 return 0; 140 140 } 141 141 142 - static int dentry_lru_show(struct seq_file *s, void *ptr) 143 - { 144 - struct ceph_fs_client *fsc = s->private; 145 - struct ceph_mds_client *mdsc = fsc->mdsc; 146 - struct ceph_dentry_info *di; 147 - 148 - spin_lock(&mdsc->dentry_lru_lock); 149 - list_for_each_entry(di, &mdsc->dentry_lru, lru) { 150 - struct dentry *dentry = di->dentry; 151 - seq_printf(s, "%p %p\t%pd\n", 152 - di, dentry, dentry); 153 - } 154 - spin_unlock(&mdsc->dentry_lru_lock); 155 - 156 - return 0; 157 - } 158 - 159 142 static int mds_sessions_show(struct seq_file *s, void *ptr) 160 143 { 161 144 struct ceph_fs_client *fsc = s->private; ··· 178 195 CEPH_DEFINE_SHOW_FUNC(mdsmap_show) 179 196 CEPH_DEFINE_SHOW_FUNC(mdsc_show) 180 197 CEPH_DEFINE_SHOW_FUNC(caps_show) 181 - CEPH_DEFINE_SHOW_FUNC(dentry_lru_show) 182 198 CEPH_DEFINE_SHOW_FUNC(mds_sessions_show) 183 199 184 200 ··· 213 231 debugfs_remove(fsc->debugfs_mds_sessions); 214 232 debugfs_remove(fsc->debugfs_caps); 215 233 debugfs_remove(fsc->debugfs_mdsc); 216 - debugfs_remove(fsc->debugfs_dentry_lru); 217 234 } 218 235 219 236 int ceph_fs_debugfs_init(struct ceph_fs_client *fsc) ··· 270 289 fsc, 271 290 &caps_show_fops); 272 291 if (!fsc->debugfs_caps) 273 - goto out; 274 - 275 - fsc->debugfs_dentry_lru = debugfs_create_file("dentry_lru", 276 - 0400, 277 - fsc->client->debugfs_dir, 278 - fsc, 279 - &dentry_lru_show_fops); 280 - if (!fsc->debugfs_dentry_lru) 281 292 goto out; 282 293 283 294 return 0;