xfs
[Top] [All Lists]

Re: review: make xfs_dm_punch_hole() atomic when punching EOF

To: David Chinner <dgc@xxxxxxx>
Subject: Re: review: make xfs_dm_punch_hole() atomic when punching EOF
From: Vlad Apostolov <vapo@xxxxxxx>
Date: Mon, 21 May 2007 12:00:24 +1000
Cc: xfs-dev <xfs-dev@xxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <20070419071856.GR48531920@xxxxxxxxxxxxxxxxx>
References: <20070419071856.GR48531920@xxxxxxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Thunderbird 1.5.0.10 (X11/20070221)
It is looking good Dave.

Regards,
Vlad

David Chinner wrote:
Currently punching a hole to EOF via xfs_dm_punch_hole()
truncates the file and then extends it. This leaves a small
window where applications can see an incorrect file size
while the punch is in progress. This can cause problems
with DMF leading to premature completion of recalls and
hence data corruption.

Use the UNRESVSP ioctl rather than FREESP+setattr to punch the
hole at EOF. This can leave specualtive allocations past EOF,
so truncate them off so we don't leave blocks that can't be
migrated away around in the filesystem.

Cheers,

Dave.


<Prev in Thread] Current Thread [Next in Thread>
  • Re: review: make xfs_dm_punch_hole() atomic when punching EOF, Vlad Apostolov <=