btrfs: add device scanned-by process name in the scan message
PATCH v2 1/1 btrfs: add device scanned-by process name in the scan message
Its very helpful if we had logged the device scanner process name to debug the race condition between the systemd-udevd scan and the user initiated device forget command.
This patch adds scanned-by process name to the scan message.
Signed-off-by Anand Jain <[email protected]>
---
v2: add pid as well
fs/btrfs/volumes.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
fs/btrfs/volumes.c +6 -4
@@ -1005,11 +1005,13 @@ static noinline struct btrfs_device *device_list_add(const char *path, *new_device_added = true;if (disk_super->label[0 ]) -pr_info ("BTRFS: device label %s devid %llu transid %llu %s\n" , - disk_super->label, devid, found_transid, path); +pr_info ("BTRFS: device label %s devid %llu transid %llu %s scanned-by %s(%d)\n" , + disk_super->label, devid, found_transid, path, + current->comm,task_pid_nr (current));else -pr_info ("BTRFS: device fsid %pU devid %llu transid %llu %s\n" , - disk_super->fsid, devid, found_transid, path); +pr_info ("BTRFS: device fsid %pU devid %llu transid %llu %s scanned-by %s(%d)\n" , + disk_super->fsid, devid, found_transid, path, + current->comm,task_pid_nr (current)); }else if (!device->name ||strcmp (device->name->str, path)) {/*
Signature · 1 line
1.8.3.1