All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs: zoned: suppress reclaim error message on EAGAIN
@ 2021-08-09  4:32 Naohiro Aota
  2021-08-10 10:31 ` Johannes Thumshirn
  2021-08-10 13:50 ` David Sterba
  0 siblings, 2 replies; 4+ messages in thread
From: Naohiro Aota @ 2021-08-09  4:32 UTC (permalink / raw)
  To: linux-btrfs; +Cc: David Sterba, Naohiro Aota, Johannes Thumshirn

btrfs_relocate_chunk() can fail with -EAGAIN when e.g. send operations are
running. The message can fail btrfs/187 and it's unnecessary because we
anyway add it back to the reclaim list.

Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
---
 fs/btrfs/block-group.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
index d5421ee0d366..a3b830b8410a 100644
--- a/fs/btrfs/block-group.c
+++ b/fs/btrfs/block-group.c
@@ -1561,7 +1561,7 @@ void btrfs_reclaim_bgs_work(struct work_struct *work)
 				div64_u64(zone_unusable * 100, bg->length));
 		trace_btrfs_reclaim_block_group(bg);
 		ret = btrfs_relocate_chunk(fs_info, bg->start);
-		if (ret)
+		if (ret && ret != -EAGAIN)
 			btrfs_err(fs_info, "error relocating chunk %llu",
 				  bg->start);
 
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] btrfs: zoned: suppress reclaim error message on EAGAIN
  2021-08-09  4:32 [PATCH] btrfs: zoned: suppress reclaim error message on EAGAIN Naohiro Aota
@ 2021-08-10 10:31 ` Johannes Thumshirn
  2021-08-10 11:25   ` Johannes Thumshirn
  2021-08-10 13:50 ` David Sterba
  1 sibling, 1 reply; 4+ messages in thread
From: Johannes Thumshirn @ 2021-08-10 10:31 UTC (permalink / raw)
  To: Naohiro Aota, linux-btrfs; +Cc: David Sterba

For those following along at home:

btrfs_reclaim_bgs_work()
`-> btrfs_relocate_chunk()
    `-> btrfs_relocate_block_group()
        `-> reloc_chunk_start()
            `-> if (fs_info->send_in_progress)
                `-> return -EAGAIN


Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] btrfs: zoned: suppress reclaim error message on EAGAIN
  2021-08-10 10:31 ` Johannes Thumshirn
@ 2021-08-10 11:25   ` Johannes Thumshirn
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Thumshirn @ 2021-08-10 11:25 UTC (permalink / raw)
  To: Naohiro Aota, linux-btrfs; +Cc: David Sterba

On 10/08/2021 12:32, Johannes Thumshirn wrote:
> For those following along at home:
> 
> btrfs_reclaim_bgs_work()
> `-> btrfs_relocate_chunk()
>     `-> btrfs_relocate_block_group()
>         `-> reloc_chunk_start()
>             `-> if (fs_info->send_in_progress)
>                 `-> return -EAGAIN
> 
> 
> Looks good,
> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> 

Totally forgot, this should probably also have:
Fixes: 18bb8bbf13c1 ("btrfs: zoned: automatically reclaim zones")

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] btrfs: zoned: suppress reclaim error message on EAGAIN
  2021-08-09  4:32 [PATCH] btrfs: zoned: suppress reclaim error message on EAGAIN Naohiro Aota
  2021-08-10 10:31 ` Johannes Thumshirn
@ 2021-08-10 13:50 ` David Sterba
  1 sibling, 0 replies; 4+ messages in thread
From: David Sterba @ 2021-08-10 13:50 UTC (permalink / raw)
  To: Naohiro Aota; +Cc: linux-btrfs, David Sterba, Johannes Thumshirn

On Mon, Aug 09, 2021 at 01:32:30PM +0900, Naohiro Aota wrote:
> btrfs_relocate_chunk() can fail with -EAGAIN when e.g. send operations are
> running. The message can fail btrfs/187 and it's unnecessary because we
> anyway add it back to the reclaim list.
> 
> Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>

With the stacktrace and Fixes: added to misc-next, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-10 13:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-09  4:32 [PATCH] btrfs: zoned: suppress reclaim error message on EAGAIN Naohiro Aota
2021-08-10 10:31 ` Johannes Thumshirn
2021-08-10 11:25   ` Johannes Thumshirn
2021-08-10 13:50 ` David Sterba

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.