1 |
From 2e7be9db125a0bf940c5d65eb5c40d8700f738b5 Mon Sep 17 00:00:00 2001 |
2 |
From: =?UTF-8?q?D=C4=81vis=20Mos=C4=81ns?= <davispuh@gmail.com> |
3 |
Date: Sat, 5 Feb 2022 20:48:23 +0200 |
4 |
Subject: btrfs: send: in case of IO error log it |
5 |
MIME-Version: 1.0 |
6 |
Content-Type: text/plain; charset=UTF-8 |
7 |
Content-Transfer-Encoding: 8bit |
8 |
|
9 |
From: Dāvis Mosāns <davispuh@gmail.com> |
10 |
|
11 |
commit 2e7be9db125a0bf940c5d65eb5c40d8700f738b5 upstream. |
12 |
|
13 |
Currently if we get IO error while doing send then we abort without |
14 |
logging information about which file caused issue. So log it to help |
15 |
with debugging. |
16 |
|
17 |
CC: stable@vger.kernel.org # 4.9+ |
18 |
Signed-off-by: Dāvis Mosāns <davispuh@gmail.com> |
19 |
Reviewed-by: David Sterba <dsterba@suse.com> |
20 |
Signed-off-by: David Sterba <dsterba@suse.com> |
21 |
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
22 |
--- |
23 |
fs/btrfs/send.c | 4 ++++ |
24 |
1 file changed, 4 insertions(+) |
25 |
|
26 |
--- a/fs/btrfs/send.c |
27 |
+++ b/fs/btrfs/send.c |
28 |
@@ -4983,6 +4983,10 @@ static int put_file_data(struct send_ctx |
29 |
lock_page(page); |
30 |
if (!PageUptodate(page)) { |
31 |
unlock_page(page); |
32 |
+ btrfs_err(fs_info, |
33 |
+ "send: IO error at offset %llu for inode %llu root %llu", |
34 |
+ page_offset(page), sctx->cur_ino, |
35 |
+ sctx->send_root->root_key.objectid); |
36 |
put_page(page); |
37 |
ret = -EIO; |
38 |
break; |