public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Sai Chaitanya Mitta <mittachaitu@gmail.com>, linux-xfs@vger.kernel.org
Subject: Re: Approach to quickly zeroing large XFS file (or) tool to mark XFS file extents as written
Date: Mon, 6 Jan 2025 23:04:59 -0800	[thread overview]
Message-ID: <20250107070459.GI6174@frogsfrogsfrogs> (raw)
In-Reply-To: <Z3zGS9Ha13I8VBtI@infradead.org>

On Mon, Jan 06, 2025 at 10:14:35PM -0800, Christoph Hellwig wrote:
> On Mon, Jan 06, 2025 at 11:46:39AM -0800, Darrick J. Wong wrote:
> > That sounds brittle -- even if someday a FALLOC_FL_WRITE_ZEROES gets
> > merged into the kernel, if anything perturbs the file mapping (e.g.
> > background backup process reflinks the file) then you immediately become
> > vulnerable to these crash integrity problems without notice.
> > 
> > (Unless you're actually getting leases on the file ranges and reacting
> > appropriately when the leases break...)
> 
> They way I understood the description they have a user space program
> exposing the XFS file over the network.  So if a change to the mapping
> happens (e.g. due to defragmentation) they would in the worst case pay
> the cost of an allocation transaction.
> 
> That is if they are really going through the normal kernel file
> abstraction and don't try to bypass it by say abusing FIEMAP
> information, in which case all hope is lost and the scheme has no chance
> of reliably working, unless we add ioctls to expose the pNFS layouts
> to userspace and they use that instead of FIEMAP.

I get this funny feeling that a lot of programs might like to lease
space and get told by the kernel when someone wants/took it back.
Swapfiles and lilo ftw.

--D

  reply	other threads:[~2025-01-07  7:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-23 16:42 Approach to quickly zeroing large XFS file (or) tool to mark XFS file extents as written Sai Chaitanya Mitta
2024-12-23 21:53 ` Darrick J. Wong
2024-12-24  5:47   ` Sai Chaitanya Mitta
2025-01-06 19:46     ` Darrick J. Wong
2025-01-07  6:14       ` Christoph Hellwig
2025-01-07  7:04         ` Darrick J. Wong [this message]
2025-01-07  8:37           ` Christoph Hellwig
2025-01-07 22:11             ` Darrick J. Wong
2024-12-24  3:42 ` Dave Chinner
2025-01-06 11:15   ` 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=20250107070459.GI6174@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=hch@infradead.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=mittachaitu@gmail.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