Commit 19fe294f2eaee33574ac1fdcf3cc26880de820ea
1 parent
9cfdc7aa9f
Exists in
master
and in
7 other branches
exofs: Prints on mount and unmout
It is important to print in the logs when a filesystem was mounted and eventually unmounted. Print the osd-device's osd_name and pid the FS was mounted/unmounted on. TODO: How to also print the namespace path the filesystem was mounted on? Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Showing 1 changed file with 11 additions and 0 deletions Side-by-side Diff
fs/exofs/super.c
... | ... | @@ -257,6 +257,15 @@ |
257 | 257 | sb->s_dirt = 0; |
258 | 258 | } |
259 | 259 | |
260 | +static void _exofs_print_device(const char *msg, const char *dev_path, | |
261 | + struct osd_dev *od, u64 pid) | |
262 | +{ | |
263 | + const struct osd_dev_info *odi = osduld_device_info(od); | |
264 | + | |
265 | + printk(KERN_NOTICE "exofs: %s %s osd_name-%s pid-0x%llx\n", | |
266 | + msg, dev_path ?: "", odi->osdname, _LLU(pid)); | |
267 | +} | |
268 | + | |
260 | 269 | /* |
261 | 270 | * This function is called when the vfs is freeing the superblock. We just |
262 | 271 | * need to free our own part. |
... | ... | @@ -279,6 +288,7 @@ |
279 | 288 | msecs_to_jiffies(100)); |
280 | 289 | } |
281 | 290 | |
291 | + _exofs_print_device("Unmounting", NULL, sbi->s_dev, sbi->s_pid); | |
282 | 292 | osduld_put_device(sbi->s_dev); |
283 | 293 | kfree(sb->s_fs_info); |
284 | 294 | sb->s_fs_info = NULL; |
... | ... | @@ -395,6 +405,7 @@ |
395 | 405 | goto free_sbi; |
396 | 406 | } |
397 | 407 | |
408 | + _exofs_print_device("Mounting", opts->dev_name, sbi->s_dev, sbi->s_pid); | |
398 | 409 | ret = 0; |
399 | 410 | out: |
400 | 411 | if (or) |