2222 * .../monmap - current monmap
2323 * .../osdc - active osd requests
2424 * .../monc - mon client state
25+ * .../client_options - libceph-only (i.e. not rbd or cephfs) options
2526 * .../dentry_lru - dump contents of dentry lru
2627 * .../caps - expose cap (reservation) stats
2728 * .../bdi - symlink to ../../bdi/something
@@ -177,10 +178,24 @@ static int osdc_show(struct seq_file *s, void *pp)
177178 return 0 ;
178179}
179180
181+ static int client_options_show (struct seq_file * s , void * p )
182+ {
183+ struct ceph_client * client = s -> private ;
184+ int ret ;
185+
186+ ret = ceph_print_client_options (s , client );
187+ if (ret )
188+ return ret ;
189+
190+ seq_putc (s , '\n' );
191+ return 0 ;
192+ }
193+
180194CEPH_DEFINE_SHOW_FUNC (monmap_show )
181195CEPH_DEFINE_SHOW_FUNC (osdmap_show )
182196CEPH_DEFINE_SHOW_FUNC (monc_show )
183197CEPH_DEFINE_SHOW_FUNC (osdc_show )
198+ CEPH_DEFINE_SHOW_FUNC (client_options_show )
184199
185200int ceph_debugfs_init (void )
186201{
@@ -242,6 +257,14 @@ int ceph_debugfs_client_init(struct ceph_client *client)
242257 if (!client -> debugfs_osdmap )
243258 goto out ;
244259
260+ client -> debugfs_options = debugfs_create_file ("client_options" ,
261+ 0600 ,
262+ client -> debugfs_dir ,
263+ client ,
264+ & client_options_show_fops );
265+ if (!client -> debugfs_options )
266+ goto out ;
267+
245268 return 0 ;
246269
247270out :
@@ -252,6 +275,7 @@ int ceph_debugfs_client_init(struct ceph_client *client)
252275void ceph_debugfs_client_cleanup (struct ceph_client * client )
253276{
254277 dout ("ceph_debugfs_client_cleanup %p\n" , client );
278+ debugfs_remove (client -> debugfs_options );
255279 debugfs_remove (client -> debugfs_osdmap );
256280 debugfs_remove (client -> debugfs_monmap );
257281 debugfs_remove (client -> osdc .debugfs_file );
0 commit comments