Linux NILFS development
 help / color / mirror / Atom feed
From: Ivan Shmakov <oneingray-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: user-level toolkit for off-line operations
Date: Sun, 17 Jun 2012 22:44:04 +0700	[thread overview]
Message-ID: <86r4terliz.fsf_-_@gray.siamics.net> (raw)
In-Reply-To: 20120616.101523.24077441.konishi.ryusuke@lab.ntt.co.jp

>>>>> Ryusuke Konishi writes:
>>>>> On Thu, 14 Jun 2012 11:22:17 +0700, Ivan Shmakov wrote:
>>>>> Ryusuke Konishi writes:

[…]

 >>> Implementing Off-line resizing is a bit tough task because it
 >>> requires a user space library to read internal meta data of the
 >>> nilfs file system and append updated blocks to it.

	… I guess that a user-level toolkit akin to e2fsprogs would be
	handy anyway.  (Shouldn't there be an fsck(8) for NILFS, BTW?)

	Other than resizing, there could be a feature to “split” a
	filesystem — take one or more “snapshot” checkpoints and make a
	copy of the parts of the filesystem “reachable” from these
	checkpoints on a distinct block device (perhaps of a differing
	size), which seems like one more way to do backups.

 >>> This is almost equivalent to implementing kernel functions of nilfs
 >>> in user land.

[…]

 >> I wonder, how complicated this task would be?  In particular, do I
 >> need to alter all the segments to resize filesystem, or only
 >> specific ones?  Also, are these internal metadata records just “a
 >> bunch of C structs”, or something more complex?

 > This needs at least the following tasks:

 > 1) Update two super blocks to increase/decrease the number of total
 > segments and the device size. (easy)

 > 2) Update segment usage information to adjust free segment count of
 > nilfs_sufile_header struct (sh_ncleansegs) which is written in
 > the segment usage file. (Sadly not easy)

 > 3) If truncating in-use segments, relocating blocks and updating disk
 > address translation information are also needed. (very hard)

	ACK.  (Fortunately, I'm not that interested in shrinking
	filesystems right now.)

 > For reference, a discussion on this topic is found in the archives of
 > the list:

 > http://marc.info/?t=128419843600003&r=1&w=2

	ACK, thanks!  I hope to take a closer look at this problem
	within two weeks or so.

	(JFTR: those reading via Gmane may access the thread via either
	of [1, 2]; the first message in the thread is [3].)

[1] http://comments.gmane.org/gmane.comp.file-systems.nilfs.user/397
[2] http://thread.gmane.org/gmane.comp.file-systems.nilfs.user/397/focus=1686
[3] news:BAEFA5609CC3AB4BAE1625CAD4C27E5C02986E1D-qPLjlnsG5hmCmmEZ8mJCX7uPtZ6Ynr+y@public.gmane.orga.com

-- 
FSF associate member #7257

--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2012-06-17 15:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-13 16:06 off-line resizing? Ivan Shmakov
     [not found] ` <86fw9zw601.fsf-Sxm0eyAyORm7AG94EA9mQA@public.gmane.org>
2012-06-14  2:06   ` Ryusuke Konishi
2012-06-14  4:22     ` Ivan Shmakov
     [not found]       ` <86lijqv7ye.fsf-Sxm0eyAyORm7AG94EA9mQA@public.gmane.org>
2012-06-16  1:15         ` Ryusuke Konishi
2012-06-17 15:44           ` Ivan Shmakov [this message]

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=86r4terliz.fsf_-_@gray.siamics.net \
    --to=oneingray-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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