* [PATCH] xfs_repair: notify user when cache flush starts
@ 2023-11-10 18:22 Eric Sandeen
2023-11-10 19:40 ` Darrick J. Wong
0 siblings, 1 reply; 3+ messages in thread
From: Eric Sandeen @ 2023-11-10 18:22 UTC (permalink / raw)
To: linux-xfs@vger.kernel.org
We recently had the opportunity to run xfs_repair on a system
with 2T of memory and over a billion inodes. After phase 7
had completed, xfs_repair appeared to have hung for over an
hour as the massive cache was written back.
In the long run it might be nice to see if we can add progress
reporting to the cache flush if it's sufficiently large, but
for now at least let the user know what's going on.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/repair/xfs_repair.c b/repair/xfs_repair.c
index ff29bea9..5597b9ba 100644
--- a/repair/xfs_repair.c
+++ b/repair/xfs_repair.c
@@ -1388,6 +1388,7 @@
* verifiers are run (where we discover the max metadata LSN), reformat
* the log if necessary and unmount.
*/
+ do_log(_("Flushing cache...\n"));
libxfs_bcache_flush();
format_log_max_lsn(mp);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs_repair: notify user when cache flush starts
2023-11-10 18:22 [PATCH] xfs_repair: notify user when cache flush starts Eric Sandeen
@ 2023-11-10 19:40 ` Darrick J. Wong
2023-11-13 16:33 ` Eric Sandeen
0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2023-11-10 19:40 UTC (permalink / raw)
To: Eric Sandeen; +Cc: linux-xfs@vger.kernel.org
On Fri, Nov 10, 2023 at 12:22:30PM -0600, Eric Sandeen wrote:
> We recently had the opportunity to run xfs_repair on a system
> with 2T of memory and over a billion inodes. After phase 7
> had completed, xfs_repair appeared to have hung for over an
> hour as the massive cache was written back.
>
> In the long run it might be nice to see if we can add progress
> reporting to the cache flush if it's sufficiently large, but
> for now at least let the user know what's going on.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
>
> diff --git a/repair/xfs_repair.c b/repair/xfs_repair.c
> index ff29bea9..5597b9ba 100644
> --- a/repair/xfs_repair.c
> +++ b/repair/xfs_repair.c
> @@ -1388,6 +1388,7 @@
> * verifiers are run (where we discover the max metadata LSN), reformat
> * the log if necessary and unmount.
> */
> + do_log(_("Flushing cache...\n"));
Does this new message affect the golden output of any fstests?
Also, while this /does/ flush the libxfs b(uffer)cache, I worry that
the phrasing will lead people into thinking that *disk* caches are being
flushed. That doesn't happen until libxfs_close_devices. I suggest:
"Writing dirty buffers..." ?
--D
> libxfs_bcache_flush();
> format_log_max_lsn(mp);
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs_repair: notify user when cache flush starts
2023-11-10 19:40 ` Darrick J. Wong
@ 2023-11-13 16:33 ` Eric Sandeen
0 siblings, 0 replies; 3+ messages in thread
From: Eric Sandeen @ 2023-11-13 16:33 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: linux-xfs@vger.kernel.org
On 11/10/23 1:40 PM, Darrick J. Wong wrote:
> On Fri, Nov 10, 2023 at 12:22:30PM -0600, Eric Sandeen wrote:
>> We recently had the opportunity to run xfs_repair on a system
>> with 2T of memory and over a billion inodes. After phase 7
>> had completed, xfs_repair appeared to have hung for over an
>> hour as the massive cache was written back.
>>
>> In the long run it might be nice to see if we can add progress
>> reporting to the cache flush if it's sufficiently large, but
>> for now at least let the user know what's going on.
>>
>> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
>> ---
>>
>> diff --git a/repair/xfs_repair.c b/repair/xfs_repair.c
>> index ff29bea9..5597b9ba 100644
>> --- a/repair/xfs_repair.c
>> +++ b/repair/xfs_repair.c
>> @@ -1388,6 +1388,7 @@
>> * verifiers are run (where we discover the max metadata LSN), reformat
>> * the log if necessary and unmount.
>> */
>> + do_log(_("Flushing cache...\n"));
>
> Does this new message affect the golden output of any fstests?
Ugh, yes, 6 or so. I'll add something to _filter_repair().
>
> Also, while this /does/ flush the libxfs b(uffer)cache, I worry that
> the phrasing will lead people into thinking that *disk* caches are being
> flushed. That doesn't happen until libxfs_close_devices. I suggest:
>
> "Writing dirty buffers..." ?
That's an excellent suggestion. I'll follow up w/ that change and a fix for
xfstests, thanks for thinking of that.
-Eric
> --D
>
>> libxfs_bcache_flush();
>> format_log_max_lsn(mp);
>>
>>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-13 16:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-10 18:22 [PATCH] xfs_repair: notify user when cache flush starts Eric Sandeen
2023-11-10 19:40 ` Darrick J. Wong
2023-11-13 16:33 ` Eric Sandeen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox