[Top] [All Lists]

Re: Doubt about allocation of extents

To: Dhruvesh Rathore <dhruvesh_r@xxxxxxxxxxx>
Subject: Re: Doubt about allocation of extents
From: Brian Foster <bfoster@xxxxxxxxxx>
Date: Thu, 12 Mar 2015 08:04:53 -0400
Cc: "sandeen@xxxxxxxxxxx" <sandeen@xxxxxxxxxxx>, "hch@xxxxxx" <hch@xxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <BLU169-W94914B167C788ACAB92562E1060@xxxxxxx>
References: <BLU169-W94914B167C788ACAB92562E1060@xxxxxxx>
User-agent: Mutt/1.5.23 (2014-03-12)
(cc xfs)

On Thu, Mar 12, 2015 at 02:03:25AM +0000, Dhruvesh Rathore wrote:
> Hi,
> I have a question about allocation of existing extents to another file, and 
> whetherit is possible ?
> A recently created file (temp) can have new extents created using 
> lseek64()and the XFS_IOC_RESVP64.These empty extents can be populated by 
> copying the data blocks from another file.(The above is mostly done in 
> xfs_fsr, the online defragmenter of XFS).
> My question is that can i assign an existing populated extent held by another 
> file, to thisnewly created temp file ?
> Any suggestions for the same will be appreciated :)

I think what you're describing is a clone or reflink type operation that
allows extents to be referenced by multiple files at once (e.g., writes
break the references via cow, etc.). Either that, or an extent move
operation that IIUC is something that extN supports. I suspect the
latter is more what you want if the target is defrag. XFS does not
support either at this time, though I think Dave is designing something
that might facilitate reflink down the road.

The only related operation I'm aware of for XFS right now is the swap
extents operation, which swaps the extents between two inodes. xfs_fsr
uses this along with a data copy to defragment files.


> Regards,Dhruvesh                                        

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Doubt about allocation of extents, Brian Foster <=