Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 749dc9b5 authored by Dāvis Mosāns's avatar Dāvis Mosāns Committed by Greg Kroah-Hartman
Browse files

btrfs: send: in case of IO error log it



commit 2e7be9db125a0bf940c5d65eb5c40d8700f738b5 upstream.

Currently if we get IO error while doing send then we abort without
logging information about which file caused issue.  So log it to help
with debugging.

CC: stable@vger.kernel.org # 4.9+
Signed-off-by: default avatarDāvis Mosāns <davispuh@gmail.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a32bb343
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -4956,6 +4956,10 @@ static ssize_t fill_read_buf(struct send_ctx *sctx, u64 offset, u32 len)
			lock_page(page);
			if (!PageUptodate(page)) {
				unlock_page(page);
				btrfs_err(fs_info,
			"send: IO error at offset %llu for inode %llu root %llu",
					page_offset(page), sctx->cur_ino,
					sctx->send_root->root_key.objectid);
				put_page(page);
				ret = -EIO;
				break;