From patchwork Tue Nov 16 22:07:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel Krisman Bertazi X-Patchwork-Id: 12623243 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41BDAC433F5 for ; Tue, 16 Nov 2021 22:08:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 050A563222 for ; Tue, 16 Nov 2021 22:08:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 050A563222 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 886B56B0071; Tue, 16 Nov 2021 17:08:04 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 835F36B0072; Tue, 16 Nov 2021 17:08:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6FE606B0074; Tue, 16 Nov 2021 17:08:04 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0184.hostedemail.com [216.40.44.184]) by kanga.kvack.org (Postfix) with ESMTP id 62EA96B0071 for ; Tue, 16 Nov 2021 17:08:04 -0500 (EST) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 3656F8698B for ; Tue, 16 Nov 2021 22:07:54 +0000 (UTC) X-FDA: 78816181668.21.731DAD3 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by imf25.hostedemail.com (Postfix) with ESMTP id 1A537B00019C for ; Tue, 16 Nov 2021 22:07:39 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id F34861F44E90 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=collabora.com; s=mail; t=1637100472; bh=mfK4dZ4kYperVuIOBXFZOBVGU/CWzg2psdu3oBXDD7U=; h=From:To:Cc:Subject:Date:From; b=HqSgOH5hat/J+65huax7Xe2XiZkApc1MPzM+9vFbx2srn9NQs9t0oJyKfy5Hedxpg Hzxy5n7VbnYQXhTxG+4+b3It0HROrb5P3XfoVO1cOK4GhTNO25Gx40zutFHz4ht5gH 5Xa6p9xNdSx9LVY3urO+IiZIMiKThho1F+6KF8p7BO6/BbMbJOnkmD+csKzSWls98w fBYSXKAf80uGrzn5dgG7sE/OhdJI6aSEKOaLhsUwx92JbJ/dMoPnibdaYFXT3/Ew/2 v8wi0cHWHx077pd4J0/pjyBvz23mQHeSOXNDOJL9odE9pTld9DlvVZw24Pi4VgpF5B Z3D9zktxkbVyw== From: Gabriel Krisman Bertazi To: hughd@google.com, akpm@linux-foundation.org Cc: linux-mm@kvack.org, jack@suse.com, amir73il@gmail.com, repnop@google.com, khazhy@google.com, Gabriel Krisman Bertazi , kernel@collabora.com Subject: [PATCH 0/2] shmem: Notify user space when file system is full Date: Tue, 16 Nov 2021 17:07:40 -0500 Message-Id: <20211116220742.584975-1-krisman@collabora.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 1A537B00019C X-Stat-Signature: nfqpw9yrk8n9k7dfo5o9dfe8h6hoi56a Authentication-Results: imf25.hostedemail.com; dkim=fail ("headers rsa verify failed") header.d=collabora.com header.s=mail header.b=HqSgOH5h; dmarc=pass (policy=none) header.from=collabora.com; spf=pass (imf25.hostedemail.com: domain of krisman@collabora.com designates 46.235.227.227 as permitted sender) smtp.mailfrom=krisman@collabora.com X-HE-Tag: 1637100459-71061 X-Bogosity: Ham, tests=bogofilter, spamicity=0.015537, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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. Gabriel Krisman Bertazi (2): shmem: Differentiate cause of blk account error due to lack of space shmem: Trigger FS_ERROR notification when file system is full mm/shmem.c | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-)