From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (Postfix) with ESMTP id 171667F4E for ; Thu, 12 Mar 2015 07:05:07 -0500 (CDT) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by relay2.corp.sgi.com (Postfix) with ESMTP id 059A1304043 for ; Thu, 12 Mar 2015 05:05:03 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by cuda.sgi.com with ESMTP id 1BjeCi1MDnCNXKLJ (version=TLSv1 cipher=AES256-SHA bits=256 verify=NO) for ; Thu, 12 Mar 2015 05:05:03 -0700 (PDT) Date: Thu, 12 Mar 2015 08:04:53 -0400 From: Brian Foster Subject: Re: Doubt about allocation of extents Message-ID: <20150312120453.GB2463@laptop.bfoster> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: Dhruvesh Rathore Cc: "sandeen@sandeen.net" , "hch@lst.de" , xfs@oss.sgi.com (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