public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Linda A. Walsh" <xfs@tlinx.org>
To: xfs-oss <xfs@oss.sgi.com>
Subject: question on new feature complexity/possibility/sensibility? (^ Alternate)
Date: Sat, 25 Jun 2011 17:29:53 -0700	[thread overview]
Message-ID: <4E067D81.4070605@tlinx.org> (raw)

I noticed in the 'cp' (coretuils 8.9-4.1) command on suse, there is a 
a "--reflink" that controls "clone/CoW" copies -- which says
it performs a 'lightweight' copy where the data blocks are copied
only when modified.  Now it is vague the 'when modified', (i.e.
does it mean ones that are different between the two copies) (src
and dst), or does it mean only to copy blocks that were modified
since 'some point' -- Doesn't say, but would guess it's src/dst diffs
(I wonder if it is restricted to the same physical filesystem).

Anyway, turns out, it's only for BTRFS (which I haven't yet used, 
and therefore know only that it supports operations like the above).  

Would it be practice to implement, some similar, feature in XFS?

It wouldn't be practice or useful to do it on an 'extent' basis due
to their large size...So to do something similar on XFS, I was
thinking,  with "some amount of effort", some number of 
"updated extents" could be kept, in addition to the original data.

Any future modifications to the file would also have the extents 
modified, but any extents that overlap previous mods will be 
merged, and only the newest data would be kept (meaning that
new sections that are written, that skip over parts of the 
file, wouldn't overwrite a pending change to that section -- only
the bytes (granularity?)  that were changed.

I.e. file is 1Mb.
User1 updates bytes 1k-200k.
User2, later updates bytes 100k-300k, 
New modification 'extent' is created with 1k-300k, with bytes
1k-(100k-1) from user1 be saved, and 100k-300k from user2.

Changes to the 'base' copy would be made upon some ioctl 'sync'
command (file-by-file)...  

It would require up to double the amount of file space.


----
Another possibility would simply be to create a record of byte
ranges that have been updated in the extent and the extent's last
modification time.  Then one could compare the mod times and 
apply the changes.   The problem there would be having to keep a
possibly 'large' log of changes (what if it's not sync/purged...
couldn't be circular as that would allow events to be lost -- though
the file system could be forced 'offline' if the event log became full
...a major pain...)..., but if it was created with a few G of space, 
might take a while...and if synced in time, no prob.



Still, may be no great desire or benefit, but DAMN if I haven't
wanted copy-on-write files for a LONG time.

I.e. being able to hardlink files, but have an option to mark it as
copy on write -- allowing space to be save when copying directory trees,
but then dynamically making new copies when someone updates one of the
linked copies.



Maybe that's a different feature that could be more easily done?

Anyway -- the new copy option just got me thinking....

Any ideas or work in thinking about things in this area for XFS to
keep it updated and 'current as a "Filesystem of Choice"....?


Thanks,
Linda



so if a user wants to modify it -- it 

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

             reply	other threads:[~2011-06-26  0:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-26  0:29 Linda A. Walsh [this message]
2011-06-27  0:32 ` question on new feature complexity/possibility/sensibility? (^ Alternate) Dave Chinner
2011-06-27  4:08   ` Linda Walsh
2011-06-27  6:02     ` Dave Chinner
2011-06-27  8:22       ` Stan Hoeppner

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=4E067D81.4070605@tlinx.org \
    --to=xfs@tlinx.org \
    --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