All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Gabriel Krisman Bertazi <krisman@collabora.com>
Cc: Hugh Dickins <hughd@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	 Linux MM <linux-mm@kvack.org>, Jan Kara <jack@suse.com>,
	 Matthew Bobrowski <repnop@google.com>,
	Khazhismel Kumykov <khazhy@google.com>,
	kernel@collabora.com
Subject: Re: [PATCH 0/2] shmem: Notify user space when file system is full
Date: Wed, 17 Nov 2021 11:00:16 +0200	[thread overview]
Message-ID: <CAOQ4uxig4GywE9TBaN7C-EHcCTyZGh4jG-CGxweT3dKdUAonzg@mail.gmail.com> (raw)
In-Reply-To: <20211116220742.584975-1-krisman@collabora.com>

On Wed, Nov 17, 2021 at 12:07 AM Gabriel Krisman Bertazi
<krisman@collabora.com> wrote:
>
> FS_ERROR is a fsnotify event type used by monitoring tools to detect
> conditions that might require intervention from a recovery tool or from
> sysadmins.  This patch series enables tmpfs to report an event when an
> operation fails because the file system is full.
>
> It attempts to only report events when the filesystem is really full,
> instead of errors caused by memory pressure. The first patch prepares
> the terrain by detecting these two different conditions, and the second
> patch actually adds the event triggers.
>

Hi Gabriel,

Two things bother me about this proposal.
One is that it makes more sense IMO to report ENOSPC events
from vfs code.

Why should the requirement to monitor ENOSPC conditions be specific to tmpfs?
Especially, as I mentioned, there are already wrappers in place to report
writeback errors on an inode (mapping_set_error), where the fsnotify hook
can fit nicely.

I understand that you wanted to differentiate errors caused by memory
pressure, but I don't understand why it makes sense for a filesystem monitor
to get a different feedback than the writing application.

The second thing that bothers me is that I think the ENOSPC condition
should not be reported on the same event mask as filesystem corruption
condition because it seems like a valid use case for filesystem monitor
to want to be notified about corruption and not about ENOSPC.

Therefore, I suggested using the event flag FS_WB_ERROR for
writeback errors. Other than the event mask, everything else is the
same. It just provides the UAPI flexibility to subscribe to one
without the other.

Thanks,
Amir.


  parent reply	other threads:[~2021-11-17  9:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-16 22:07 [PATCH 0/2] shmem: Notify user space when file system is full Gabriel Krisman Bertazi
2021-11-16 22:07 ` [PATCH 1/2] shmem: Differentiate cause of blk account error due to lack of space Gabriel Krisman Bertazi
2021-11-16 22:07 ` [PATCH 2/2] shmem: Trigger FS_ERROR notification when file system is full Gabriel Krisman Bertazi
2021-11-17  9:00 ` Amir Goldstein [this message]
2022-01-11  1:57   ` [PATCH 0/2] shmem: Notify user space " Gabriel Krisman Bertazi
2022-01-11  7:50     ` Amir Goldstein
2022-01-12  3:19       ` Gabriel Krisman Bertazi
2022-01-12  5:59         ` Amir Goldstein
2022-01-14 20:17           ` Gabriel Krisman Bertazi
2022-01-14 22:16             ` Khazhy Kumykov
2022-01-15 11:30               ` Amir Goldstein

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=CAOQ4uxig4GywE9TBaN7C-EHcCTyZGh4jG-CGxweT3dKdUAonzg@mail.gmail.com \
    --to=amir73il@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=jack@suse.com \
    --cc=kernel@collabora.com \
    --cc=khazhy@google.com \
    --cc=krisman@collabora.com \
    --cc=linux-mm@kvack.org \
    --cc=repnop@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.