Darrick J. Wong
af9f02457f
xfs: fix null bno_hint handling in xfs_rtallocate_rtg
...
xfs_bmap_rtalloc initializes the bno_hint variable to NULLRTBLOCK (aka
NULLFSBLOCK). If the allocation request is for a file range that's
adjacent to an existing mapping, it will then change bno_hint to the
blkno hint in the bmalloca structure.
In other words, bno_hint is either a rt block number, or it's all 1s.
Unfortunately, commit ec12f97f1b8a8f didn't take the NULLRTBLOCK state
into account, which means that it tries to translate that into a
realtime extent number. We then end up with an obnoxiously high rtx
number and pointlessly feed that to the near allocator. This often
fails and falls back to the by-size allocator. Seeing as we had no
locality hint anyway, this is a waste of time.
Fix the code to detect a lack of bno_hint correctly. This was detected
by running xfs/009 with metadir enabled and a 28k rt extent size.
Cc: <stable@vger.kernel.org> # v6.12
Fixes: ec12f97f1b8a8f ("xfs: make the rtalloc start hint a xfs_rtblock_t")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2024-12-12 17:45:09 -08:00
..
2024-11-16 17:23:19 +09:00
2024-10-08 14:41:53 +02:00
2024-10-08 14:41:53 +02:00
2024-11-01 07:37:10 -10:00
2024-10-28 13:16:56 +01:00
2024-11-25 16:09:48 -08:00
2024-09-18 11:44:43 +02:00
2024-08-07 11:33:21 +02:00
2024-12-10 18:18:01 -08:00
2024-11-11 14:39:38 +01:00
2024-11-30 10:22:38 -08:00
2024-08-19 13:45:03 +02:00
2024-11-14 07:45:20 +01:00
2024-07-15 11:14:59 -07:00
2024-11-19 10:43:44 -08:00
2024-10-23 16:47:01 +02:00
2024-11-18 10:05:57 -06:00
2024-11-26 13:39:02 -08:00
2024-12-02 11:34:44 -08:00
2024-10-15 15:58:36 +02:00
2024-11-18 18:50:14 +08:00
2024-11-25 17:08:27 +09:00
2024-11-15 11:34:57 +01:00
2024-09-16 09:14:02 +02:00
2024-11-18 16:32:58 -08:00
2024-11-26 12:50:58 -08:00
2024-10-17 00:28:06 -07:00
2024-11-06 10:42:06 +01:00
2024-11-27 13:11:58 -08:00
2024-11-26 12:34:50 -08:00
2024-10-08 14:41:46 +02:00
2024-11-18 09:35:30 -08:00
2024-11-15 20:55:32 +01:00
2024-10-08 14:41:53 +02:00
2024-12-02 11:48:14 +00:00
2024-11-26 18:15:06 +01:00
2024-11-06 20:24:41 +01:00
2024-11-13 12:56:48 -05:00
2024-12-05 12:31:40 +01:00
2024-11-21 09:59:59 -08:00
2024-11-26 12:59:30 -08:00
2024-08-07 11:33:36 +02:00
2024-11-21 09:35:25 +01:00
2024-11-30 10:17:53 -08:00
2024-11-18 20:23:12 -05:00
2024-11-26 12:59:30 -08:00
2024-12-05 19:54:43 -08:00
2024-10-02 17:23:23 -04:00
2024-11-21 09:55:45 -08:00
2024-11-01 11:19:53 +03:00
2024-12-05 19:54:45 -08:00
2024-08-07 11:33:21 +02:00
2024-06-20 09:46:01 +02:00
2024-10-02 17:23:23 -04:00
2024-11-22 20:55:42 -08:00
2024-12-05 19:54:42 -08:00
2024-12-01 15:12:43 -08:00
2024-05-28 11:52:53 +02:00
2024-08-07 11:31:56 +02:00
2024-11-26 22:54:00 +01:00
2024-08-21 22:32:58 +02:00
2024-12-07 17:27:25 -08:00
2024-10-30 20:14:12 -07:00
2024-11-05 14:00:28 +01:00
2024-08-07 11:33:36 +02:00
2024-07-22 18:25:47 -07:00
2024-11-01 08:38:14 -04:00
2024-11-30 10:32:47 -08:00
2024-11-26 22:54:24 +01:00
2024-11-12 19:02:12 -05:00
2024-11-22 20:50:55 -08:00
2024-08-07 11:32:02 +02:00
2024-08-20 14:03:18 -04:00
2024-12-12 17:45:09 -08:00
2024-10-02 12:02:15 -07:00
2024-11-19 16:35:06 -08:00
2024-10-10 10:20:51 +02:00
2024-11-26 18:13:29 +01:00
2024-11-27 12:51:30 +01:00
2024-11-27 12:51:30 +01:00
2024-10-02 17:23:23 -04:00
2024-11-27 12:51:30 +01:00
2024-05-28 12:06:51 +02:00
2024-08-07 11:26:54 -07:00
2024-11-23 09:58:07 -08:00
2024-10-22 11:16:57 +02:00
2024-10-17 18:38:49 +01:00
2024-10-22 11:16:58 +02:00
2024-10-07 13:51:47 +02:00
2024-11-23 09:58:07 -08:00
2024-08-19 13:45:02 +02:00
2024-07-24 20:59:29 +02:00
2024-11-03 01:28:06 -05:00
2024-11-21 08:28:08 -08:00
2024-11-27 12:51:30 +01:00
2024-11-25 15:16:49 +01:00
2024-11-26 13:26:15 -08:00
2024-10-30 09:58:02 +01:00
2024-11-18 10:30:29 -08:00
2024-11-18 10:45:06 -08:00
2024-11-13 14:08:34 +01:00
2024-11-03 01:28:06 -05:00
2024-11-23 09:58:07 -08:00
2024-11-18 14:54:10 -08:00
2024-11-03 01:28:06 -05:00
2024-10-21 16:29:38 +02:00
2024-06-19 13:13:55 -07:00
2024-11-03 01:28:06 -05:00
2024-11-18 14:54:10 -08:00
2024-11-03 01:28:06 -05:00
2024-10-21 16:29:38 +02:00
2024-09-24 15:29:42 -07:00
2024-09-16 11:15:26 +02:00
2024-10-28 13:26:54 +01:00
2024-11-18 12:44:25 -08:00
2024-11-21 09:35:31 +01:00
2024-09-27 08:18:43 -07:00
2024-11-21 09:55:45 -08:00
2024-10-24 13:54:51 +02:00
2024-09-27 08:18:43 -07:00
2024-10-22 11:16:59 +02:00
2024-06-28 14:36:43 +02:00
2024-11-18 12:24:06 -08:00
2024-11-03 01:28:06 -05:00
2024-11-03 01:28:07 -05:00
2024-11-03 01:28:07 -05:00
2024-10-22 11:16:57 +02:00
2024-11-03 01:28:06 -05:00
2024-11-03 01:28:06 -05:00
2024-11-18 14:54:10 -08:00
2024-11-03 01:28:06 -05:00
2024-10-21 14:30:26 +02:00
2024-11-03 01:28:06 -05:00
2024-11-19 16:35:06 -08:00
2024-10-28 21:40:38 -07:00
2024-11-03 01:28:06 -05:00
2024-11-06 13:00:01 -05:00