Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Johannes Thumshirn <johannes.thumshirn@wdc.com>
To: Jochen Philipp <a2jphilipp@gmail.com>
Cc: Dongjiang Zhu <zhudongjiang@fygo.io>,
	linux-btrfs@vger.kernel.org,  Naohiro Aota <Naohiro.Aota@wdc.com>
Subject: Re: Subject: zoned: transaction abort with -EAGAIN (-11) on host-managed SMR (WD HC670), fs forced read-only
Date: Mon, 9 Nov 2026 10:09:12 +0100	[thread overview]
Message-ID: <avGNQ29RVwByM4HC@mayhem.fritz.box> (raw)
In-Reply-To: <CAD=K2o8EAtV0p1dXBBXvrjw99zOb_XJUZ=Zz+1BjwVmhsScMDA@mail.gmail.com>

On Fri, Nov 06, 2026 at 08:36:16AM +0100, Jochen Philipp wrote:
> Hi Dongjiang,
> 
> thanks for reaching out - yes, I'm willing to give it a try.
> 
> Johannes asked me to keep the on-disk state untouched while he
> looks at the zone report, so I'd like to coordinate with him
> first: Johannes, are you fine with me testing Dongjiang's series
> on this fs, or do you need anything else from the current state
> before I do?
> 
> For testing I can set up a separate machine (bare metal, no
> out-of-tree modules), so my main system isn't affected and
> switching kernels is easy. I'd move the drive over there.
> 
> Two practical questions, since I've never built a patched kernel
> for testing:
> - Which base should I apply the series to (e.g. 7.3, or a
>   specific btrfs branch)?
> - Is there a git branch with the series applied that I could
>   use instead?

I think I could re-create the issue and unfortunately Dongjiang's patch didn't
fix it for me (I've only applied patch 2 not the whole branch). What fixes it
for me is:


diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
index 3192b86669b9..3724cc0120d9 100644
--- a/fs/btrfs/zoned.c
+++ b/fs/btrfs/zoned.c
@@ -3115,8 +3115,12 @@ void btrfs_check_active_zone_reservation(struct btrfs_fs_info *fs_info)
 		      (BTRFS_BLOCK_GROUP_METADATA | BTRFS_BLOCK_GROUP_SYSTEM)))
 			continue;
 
-		for (int i = 0; i < map->num_stripes; i++)
-			map->stripes[i].dev->zone_info->reserved_active_zones--;
+		for (int i = 0; i < map->num_stripes; i++) {
+			struct btrfs_device *dev = map->stripes[i].dev;
+
+			if (btrfs_dev_is_sequential(dev, map->stripes[i].physical))
+				dev->zone_info->reserved_active_zones--;
+		}
 	}
 	spin_unlock(&fs_info->zone_active_bgs_lock);
 }


  parent reply	other threads:[~2026-11-09  9:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-19 14:31 Subject: zoned: transaction abort with -EAGAIN (-11) on host-managed SMR (WD HC670), fs forced read-only Jochen Philipp
2026-10-20  9:26 ` Johannes Thumshirn
     [not found]   ` <CAD=K2o_-NwLNpvNE+OreAmsvX+izzZnb2R1nCBV0gDf6fH=kmw@mail.gmail.com>
     [not found]     ` <904615c7-003a-4158-922d-c57dee9a3ecf@wdc.com>
     [not found]       ` <CAD=K2o_vLPSvm4Qzi8y4t5ay+Na9GNk2t5a3iMO3NYJvwodKDQ@mail.gmail.com>
     [not found]         ` <CAD=K2o8xFgYBHMim-KqMysV+Tec9LEUbo6jfD6R-GOAU8N8K4w@mail.gmail.com>
     [not found]           ` <CAD=K2o8kWgTRqBBw1sRfO2fopqQOLfdeX61h=OFPMST=Wdo+KQ@mail.gmail.com>
     [not found]             ` <30a6e871-8578-4d27-bb0a-679b94fb7f92@wdc.com>
2026-11-05 13:36               ` Jochen Philipp
     [not found]                 ` <CAD=K2o_MwSF_XS=iRu8GMPhH2Sn6t3bsKLm5BLOjZ34tV4aRvg@mail.gmail.com>
2026-11-05 13:48                   ` Jochen Philipp
2026-11-05 15:04                     ` Johannes Thumshirn
2026-11-05 15:19                       ` Jochen Philipp
2026-11-05 16:09                         ` Johannes Thumshirn
2026-11-05 16:30                           ` Jochen Philipp
2026-11-06  2:23                             ` Dongjiang Zhu
2026-11-06  7:36                               ` Jochen Philipp
2026-11-06  9:26                                 ` Johannes Thumshirn
2026-11-06  9:34                                 ` Dongjiang Zhu
2026-11-09  9:09                                 ` Johannes Thumshirn [this message]
2026-11-09 10:01                                   ` Jochen Philipp
2026-11-09 12:51                                     ` Johannes Thumshirn
2026-11-09 13:10                                       ` Jochen Philipp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=avGNQ29RVwByM4HC@mayhem.fritz.box \
    --to=johannes.thumshirn@wdc.com \
    --cc=Naohiro.Aota@wdc.com \
    --cc=a2jphilipp@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=zhudongjiang@fygo.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox