Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: "Massimo B." <massimo.b@gmx.net>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: I/O blocked after booting
Date: Thu, 28 Mar 2024 11:39:36 +0100	[thread overview]
Message-ID: <47440995279bdba442678e807499fff05ee49302.camel@gmx.net> (raw)
In-Reply-To: <22650868-6777-41ae-a068-37821929be7c@gmx.com>

On Thu, 2024-03-28 at 20:40 +1030, Qu Wenruo wrote:
> Disable disable (nodiscard mount option), as it looks like there is
> something wrong with the auto discard, then retry.
> 
> This is mostly related to your NVME device's discard implementation, and
> I believe manually fstrim may be a better and more reliable solution.

Ok, I'm going to try.
Beside that I'm using different NVMe models and also an SATA SSD "Samsung SSD
860" and all are affected by that issue.

So you mean a daily cronjob for fstrim would be preferable?

Trying  fstrim -a -v  here with the very common Samsung SSD 970 PRO 1TB NVMe,
the command started discarding small partitions:

/boot/efi: 31,6 MiB (33183744 bytes) trimmed on /dev/nvme1n1p1
/boot: 0 B (0 bytes) trimmed on /dev/nvme1n1p2

but then does not return after 20 minutes. There is no IO on the disk which
might be ok for fstrim only communicating with the controler. But fstrim process
has some CPU usage...

And I see the same syslog entries after starting the fstrim:

Mar 28 11:38:26 [kernel] [14826.740669] BTRFS warning (device dm-0): failed to trim 698 block group(s), last error -512
Mar 28 11:38:26 [kernel] [14826.741731] BTRFS warning (device dm-0): failed to trim 1 device(s), last error -512

Best regards,
Massimo

  reply	other threads:[~2024-03-28 10:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-21 13:13 I/O blocked after booting Massimo B.
2024-03-28  8:36 ` HAN Yuwei
2024-03-28 10:10 ` Qu Wenruo
2024-03-28 10:39   ` Massimo B. [this message]
2024-03-28 14:55     ` Massimo B.
2024-03-28 17:24       ` Roman Mamedov
2024-03-28 20:23       ` Qu Wenruo
2024-06-14  8:32         ` Massimo B.
2024-06-14 21:57           ` Qu Wenruo

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=47440995279bdba442678e807499fff05ee49302.camel@gmx.net \
    --to=massimo.b@gmx.net \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.com \
    /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