[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BAY179-W923915B59A3302CF7A1CB0FDCC0@phx.gbl>
Date: Thu, 11 Sep 2014 15:48:02 -0400
From: TR Reardon <thomas_reardon@...mail.com>
To: Andreas Dilger <adilger@...ger.ca>
CC: "Darrick J. Wong" <darrick.wong@...cle.com>,
"linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>
Subject: RE: possible different donor file naming in e4defrag
Picking this back up. How would O_TMPFILE avoid races? It definitely avoids the unwanted mtime/atime update, but then the existing "<filename>.defrag" pseudo-lock file would no longer be available. How could you use O_TMPFILE and still avoid multiple defrag? If this isn't possible, then resetting the parent times on unlink(tmpfile), as you suggest, is the simplest way out of this.
+Reardon
> From: adilger@...ger.ca
> Subject: Re: possible different donor file naming in e4defrag
> Date: Fri, 15 Aug 2014 23:04:21 +0200
> To: thomas_reardon@...mail.com
>
> The reason the donor file is created in the same directory as the source is to try and keep the block allocation policy consistent with the original inode.
>
> You may not need a SIGINT handler, since the timestamp could be reset as soon as the file is created and unlinked.
>
> It may also be possible to use O_TMPFILE on newer kernels to create the donor file to avoid any races?
>
> Cheers, Andreas
>
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists