mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Hungyu Lin <dennylin0707@gmail.com>, Jaegeuk Kim <jaegeuk@kernel.org>
Cc: chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] f2fs: report sub-block project quotas in statfs
Date: Mon, 2 Nov 2026 10:23:52 +0800	[thread overview]
Message-ID: <abdfe196-e847-4f11-8d1e-b53bc565a078@kernel.org> (raw)
In-Reply-To: <20261101230552.55034-1-dennylin0707@gmail.com>

On 11/2/26 07:05, Hungyu Lin wrote:
> f2fs_statfs_project() converts the selected block quota from bytes to
> filesystem blocks before checking whether a limit is set. A nonzero
> limit smaller than one filesystem block therefore becomes zero and
> skips the project block statistics.
> 
> For example, on a filesystem with 4 KiB blocks, setquota accepts a
> 1 KiB project hard limit, but df on the project-inherit directory
> reports the filesystem-wide capacity and free space instead of zero
> whole blocks. Quota enforcement still rejects a write that requires
> another data block.
> 
> Check the byte limit before converting it to blocks. This distinguishes
> a sub-block limit from an unlimited quota while retaining the existing
> rounding and free-space calculations.
> 

Cc: stable@vger.kernel.org

> Fixes: ddc34e328d06 ("f2fs: introduce f2fs_statfs_project")
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,

      reply	other threads:[~2026-11-02  2:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-01 23:05 Hungyu Lin
2026-11-02  2:23 ` Chao Yu [this message]

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=abdfe196-e847-4f11-8d1e-b53bc565a078@kernel.org \
    --to=chao@kernel.org \
    --cc=dennylin0707@gmail.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®