public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Dhruvesh Rathore <dhruvesh_r@hotmail.com>
Cc: "sandeen@sandeen.net" <sandeen@sandeen.net>,
	"hch@lst.de" <hch@lst.de>,
	xfs@oss.sgi.com
Subject: Re: Doubt about allocation of extents
Date: Thu, 12 Mar 2015 08:04:53 -0400	[thread overview]
Message-ID: <20150312120453.GB2463@laptop.bfoster> (raw)
In-Reply-To: <BLU169-W94914B167C788ACAB92562E1060@phx.gbl>

(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.

Brian

> Regards,Dhruvesh  		 	   		  

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

           reply	other threads:[~2015-03-12 12:05 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <BLU169-W94914B167C788ACAB92562E1060@phx.gbl>]

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=20150312120453.GB2463@laptop.bfoster \
    --to=bfoster@redhat.com \
    --cc=dhruvesh_r@hotmail.com \
    --cc=hch@lst.de \
    --cc=sandeen@sandeen.net \
    --cc=xfs@oss.sgi.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