All of lore.kernel.org
 help / color / mirror / Atom feed
From: xfs@pengaru.com
To: xfs@oss.sgi.com
Cc: vito.caputo@coreos.com
Subject: question re: xfs inode to inode copy implementation
Date: Mon, 20 Apr 2015 20:06:46 -0500	[thread overview]
Message-ID: <20150421010646.GX8110@shells.gnugeneration.com> (raw)

Hello list,

I'm prototyping something like reflinks in xfs and was wondering if
anyone could give me some pointers on the best way to duplicate the
blocks of the shared inode at the reflink inode, the copy which must
occur when breaking the link.

It would be nice to do the transfer via the page cache after allocating
the space at the desintation inode, but it doesn't seem like I can use
any of the kernel helpers for copying the data via the address_space
structs since I don't have a struct file on hand for the copy source.
I'm doing this in xfs_file_open() so the only struct file I have is the
file being opened for writing - the destination of the copy.

What I do have on hand is the shared inode and the destination inode
opened and ready to go, and the struct file for the destination.

My prototype already mostly works just using xfs_alloc_file_space() to
allocate the appropriate space in the destination inode, but I need to
get that allocated space populated from the shared inode's extents.

Any pointers appreciated, thanks!

Regards,
Vito Caputo


P.S. I've seen Dave Chinner's mention of reflink prototypes in XFS on
lwn but haven't been able to find any code, what's the status of that?

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

             reply	other threads:[~2015-04-21  1:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-21  1:06 xfs [this message]
2015-04-21  4:28 ` question re: xfs inode to inode copy implementation Darrick J. Wong
2015-04-21 22:27   ` Dave Chinner
2015-04-23  0:44     ` Darrick J. Wong
2015-04-23  1:13       ` Dave Chinner
2015-04-23  6:40         ` Darrick J. Wong
2015-04-26 22:40           ` Dave Chinner
2015-04-30  0:53   ` xfs
2015-04-30  6:26     ` Dave Chinner
2015-04-30  8:03       ` Darrick J. Wong

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=20150421010646.GX8110@shells.gnugeneration.com \
    --to=xfs@pengaru.com \
    --cc=vito.caputo@coreos.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.