Linux block layer
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: Rajeev Mishra <rajeevm@hpe.com>,
	axboe@kernel.dk, yukuai1@huaweicloud.com,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] loop: use vfs_getattr_nosec() for accurate file size
Date: Tue, 12 Aug 2025 05:28:26 +0100	[thread overview]
Message-ID: <20250812042826.GU222315@ZenIV> (raw)
In-Reply-To: <34624336-331d-4047-822f-8091098eeebc@kernel.org>

On Tue, Aug 12, 2025 at 12:42:44PM +0900, Damien Le Moal wrote:

> Since loff_t is "long long", so a signed type, I would keep this interface and
> add a negative error check in the 2 call sites for get_size(). That is simpler.

Umm...  First of all, what's the point of separate get_size() and loop_get_size()?
Another thing to watch out for - replacing file needs to be careful, lest you
replace the old file that has come to fail vfs_getattr() with new one that
does the same thing ;-)

  reply	other threads:[~2025-08-12  4:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-11 19:03 [PATCH v2] loop: use vfs_getattr_nosec() for accurate file size Rajeev Mishra
2025-08-12  1:40 ` Damien Le Moal
2025-08-12  2:05   ` Yu Kuai
2025-08-12  3:32     ` Rajeev Mishra
2025-08-12  3:42       ` Damien Le Moal
2025-08-12  4:28         ` Al Viro [this message]
2025-08-12  5:17           ` Damien Le Moal
2025-08-12  8:37             ` Christoph Hellwig
2025-08-12  9:34               ` Yu Kuai
2025-08-12  8:39         ` Christoph Hellwig
2025-08-12  4:25       ` Al Viro
2025-08-12  8:39 ` Christoph Hellwig

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=20250812042826.GU222315@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=axboe@kernel.dk \
    --cc=dlemoal@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rajeevm@hpe.com \
    --cc=yukuai1@huaweicloud.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