linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [btrfs-progs] btrfs filesystem defragment now outputs processed filenames ?
@ 2022-10-17 11:32 Lionel Bouton
  2022-10-17 15:47 ` Patrik Lundquist
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Lionel Bouton @ 2022-10-17 11:32 UTC (permalink / raw)
  To: Btrfs BTRFS

Hi,

I just noticed a change in behavior for btrfs-progs (at least in 6.0-1 
on Arch Linux). It now outputs the filenames it defragments and I can't 
find a command line option to disable it.

I'm using a defragment scheduler which triggers file defragmentation 
file by file and even recently by offset and size in a file (to limit 
the IO load spikes that can happen when defragmenting large files on HDD 
and T/QLC SSD/NVME with small SLC buffers).
Currently the scheduler forwards the btrfs command's output to its own 
and it pollutes the logs with superfluous information (when 
defragmenting in 128MB chunks I get tens of log lines for multiple GB 
files).

This isn't a big problem and it is easily fixable in my scheduler but I 
was wondering if there is any plan to allow silencing it or should I 
just cleanup the ouput before forwarding it (I prefer to write any 
unexpected output in logs instead of ignoring everything) ?

Best regards,

Lionel


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

* Re: [btrfs-progs] btrfs filesystem defragment now outputs processed filenames ?
  2022-10-17 11:32 [btrfs-progs] btrfs filesystem defragment now outputs processed filenames ? Lionel Bouton
@ 2022-10-17 15:47 ` Patrik Lundquist
  2022-10-17 16:38   ` Lionel Bouton
  2022-10-17 16:50 ` Roman Mamedov
  2022-11-11 15:47 ` David Sterba
  2 siblings, 1 reply; 5+ messages in thread
From: Patrik Lundquist @ 2022-10-17 15:47 UTC (permalink / raw)
  To: Lionel Bouton; +Cc: Btrfs BTRFS

On Mon, 17 Oct 2022 at 14:00, Lionel Bouton
<lionel-subscription@bouton.name> wrote:
>
> I just noticed a change in behavior for btrfs-progs (at least in 6.0-1
> on Arch Linux). It now outputs the filenames it defragments and I can't
> find a command line option to disable it.

I just noticed it too. You can silence it with --quiet:

btrfs --quiet filesystem defragment ...

/pLu

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

* Re: [btrfs-progs] btrfs filesystem defragment now outputs processed filenames ?
  2022-10-17 15:47 ` Patrik Lundquist
@ 2022-10-17 16:38   ` Lionel Bouton
  0 siblings, 0 replies; 5+ messages in thread
From: Lionel Bouton @ 2022-10-17 16:38 UTC (permalink / raw)
  To: Patrik Lundquist; +Cc: Btrfs BTRFS

Le 17/10/2022 à 17:47, Patrik Lundquist a écrit :
> On Mon, 17 Oct 2022 at 14:00, Lionel Bouton
> <lionel-subscription@bouton.name> wrote:
>> I just noticed a change in behavior for btrfs-progs (at least in 6.0-1
>> on Arch Linux). It now outputs the filenames it defragments and I can't
>> find a command line option to disable it.
> I just noticed it too. You can silence it with --quiet:
>
> btrfs --quiet filesystem defragment ...

And it was right there in the output of "btrfs --help" too :-(
Sorry for the noise.

Lionel

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

* Re: [btrfs-progs] btrfs filesystem defragment now outputs processed filenames ?
  2022-10-17 11:32 [btrfs-progs] btrfs filesystem defragment now outputs processed filenames ? Lionel Bouton
  2022-10-17 15:47 ` Patrik Lundquist
@ 2022-10-17 16:50 ` Roman Mamedov
  2022-11-11 15:47 ` David Sterba
  2 siblings, 0 replies; 5+ messages in thread
From: Roman Mamedov @ 2022-10-17 16:50 UTC (permalink / raw)
  To: Lionel Bouton; +Cc: Btrfs BTRFS

On Mon, 17 Oct 2022 13:32:03 +0200
Lionel Bouton <lionel-subscription@bouton.name> wrote:

> This isn't a big problem and it is easily fixable in my scheduler but I 
> was wondering if there is any plan to allow silencing it or should I 
> just cleanup the ouput before forwarding it (I prefer to write any 
> unexpected output in logs instead of ignoring everything) ?

If there wasn't a "--quiet", the usual approach would be to discard stdout and
log stderr; or log stdout, but log and mail stderr. So you only get notified
of any errors, and not the normal operation output. That's assuming btrfs
progs follow the good practice and designate printed messages accordingly
between these two (I did not check).

-- 
With respect,
Roman

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

* Re: [btrfs-progs] btrfs filesystem defragment now outputs processed filenames ?
  2022-10-17 11:32 [btrfs-progs] btrfs filesystem defragment now outputs processed filenames ? Lionel Bouton
  2022-10-17 15:47 ` Patrik Lundquist
  2022-10-17 16:50 ` Roman Mamedov
@ 2022-11-11 15:47 ` David Sterba
  2 siblings, 0 replies; 5+ messages in thread
From: David Sterba @ 2022-11-11 15:47 UTC (permalink / raw)
  To: Lionel Bouton; +Cc: Btrfs BTRFS

On Mon, Oct 17, 2022 at 01:32:03PM +0200, Lionel Bouton wrote:
> Hi,
> 
> I just noticed a change in behavior for btrfs-progs (at least in 6.0-1 
> on Arch Linux). It now outputs the filenames it defragments and I can't 
> find a command line option to disable it.
> 
> I'm using a defragment scheduler which triggers file defragmentation 
> file by file and even recently by offset and size in a file (to limit 
> the IO load spikes that can happen when defragmenting large files on HDD 
> and T/QLC SSD/NVME with small SLC buffers).
> Currently the scheduler forwards the btrfs command's output to its own 
> and it pollutes the logs with superfluous information (when 
> defragmenting in 128MB chunks I get tens of log lines for multiple GB 
> files).
> 
> This isn't a big problem and it is easily fixable in my scheduler but I 
> was wondering if there is any plan to allow silencing it or should I 
> just cleanup the ouput before forwarding it (I prefer to write any 
> unexpected output in logs instead of ignoring everything) ?

Printing file names was unintentional, tracked as
https://github.com/kdave/btrfs-progs/issues/540 and will be fixed in
6.0.2.

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

end of thread, other threads:[~2022-11-11 15:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-17 11:32 [btrfs-progs] btrfs filesystem defragment now outputs processed filenames ? Lionel Bouton
2022-10-17 15:47 ` Patrik Lundquist
2022-10-17 16:38   ` Lionel Bouton
2022-10-17 16:50 ` Roman Mamedov
2022-11-11 15:47 ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).