Skip to contentSkip to conversation

Asking for inclusion of nilfs2 in the mainline kernel

DISCUSSION Ryusuke Konishi 6 participants 10 messages Mar 10, 2009 – Mar 13, 2009 VFS

lore
Share & tools
lore
#0 lore raw

Hi,

I've been working for the past serveral months to take review comments and to continually solve users' problems come up in mainling list (thanks for all giving comments and feedbacks!). Also, I've tried to stabilize API and disk format to restrict additional changes and ensure backward compatibility.

Except adding ioctl commands for user-demanded features, I think the interface was almost stabilized. Now I'd like to ask for mainline inclusion so that more people can try this in the tree.

This file system, nilfs2, provides continuous snapshotting; it gives not only versioning capability of the entire file system but also retroactively selectable and recoverable snapshots.

With nilfs2, users can even restore files and namespace mistakenly overwritten or destroyed just a few seconds ago.

The restoration with nilfs snapshots is, for example, done as follows:

 # lscp
 (list checkpoints)
            CNO        DATE     TIME  MODE  FLG   NBLKINC       ICNT
          33338  2009-03-08 14:45:49   cp    -         11          3
          33339  2009-03-08 14:50:22   cp    -     200523         81
          33340  2009-03-08 20:40:34   cp    -        136         61
          33341  2009-03-08 20:41:20   cp    -     187666       1604
          33342  2009-03-08 20:41:42   cp    -         51       1634
            ...
 # chcp ss 33339 ; lscp
 (select an existing checkpoint and change it into a snapshot)
            CNO        DATE     TIME  MODE  FLG   NBLKINC       ICNT
          33338  2009-03-08 14:45:49   cp    -         11          3
          33339  2009-03-08 14:50:22   ss    -     200523         81
          33340  2009-03-08 20:40:34   cp    -        136         61
          33341  2009-03-08 20:41:20   cp    -     187666       1604
          33342  2009-03-08 20:41:42   cp    -         51       1634
            ...
 # mount -t nilfs2 -r -o cp=33339 /dev/sdb1 /snap
 (mount the snapshot, then it will become accessible on the mount point)

Where snapshots will remain in the disk, whereas plain checkpoints will be reclaimed automatically after a certain (guaranteed) period.

These snapshot operations are quickly performable.

There is no limit on the number of checkpoints and snapshots until the volume gets full. We have long term use experience of nilfs2 about eleven months on a server; several thousands of checkpoints are dealt with constantly there.

On the other hand, performance tuning has left on the back burner. I feel B-tree lookup routines and log writer have room for improvement to get better read/write throughput. In addition, defrag should be applied, maybe with help from the userland cleaner daemon; a recent measurement on the above aged partition shows 20~25% degradation. These are todo items.

So, we'd like to address such remaining challenges with eliminating user issues ongoingly and simplifying implementation at every opportunity.

Nilfs userland tools:

http://www.nilfs.org/en/download.html

General nilfs information:

http://www.nilfs.org/en/

Nilfs usage:

http://www.nilfs.org/en/about_nilfs.html

TODO items:

http://www.nilfs.org/en/current_status.html

User Mailing list:

https://www.nilfs.org/mailman/listinfo/users

Thanks,
Ryusuke Konishi

#1 lore raw

Hello,

Quoted 10 lines · Ryusuke Konishi
 # lscp
 (list checkpoints)
            CNO        DATE     TIME  MODE  FLG   NBLKINC       ICNT
          33338  2009-03-08 14:45:49   cp    -         11          3
          33339  2009-03-08 14:50:22   cp    -     200523         81
          33340  2009-03-08 20:40:34   cp    -        136         61
          33341  2009-03-08 20:41:20   cp    -     187666       1604
          33342  2009-03-08 20:41:42   cp    -         51       1634
            ...

Is there a cheaty way to get at checkpointed files (and the list of checkpoints) through some sort of magic dot directory system (so you wouldn't need the userland tools and the remounting)?

Signature · 1 line
Sitsofe | http://sucs.org/~sits/
#2 lore raw

Hi,

Quoted 14 lines · Sitsofe Wheeler

Hello,

Quoted 10 lines · Ryusuke Konishi
 # lscp
 (list checkpoints)
            CNO        DATE     TIME  MODE  FLG   NBLKINC       ICNT
          33338  2009-03-08 14:45:49   cp    -         11          3
          33339  2009-03-08 14:50:22   cp    -     200523         81
          33340  2009-03-08 20:40:34   cp    -        136         61
          33341  2009-03-08 20:41:20   cp    -     187666       1604
          33342  2009-03-08 20:41:42   cp    -         51       1634
            ...
Quoted 3 lines

Is there a cheaty way to get at checkpointed files (and the list of checkpoints) through some sort of magic dot directory system (so you wouldn't need the userland tools and the remounting)?

No, we don't give the special namespace extension to nilfs2.

Instead, we have adopted out-of-filesystem solution, that is, using autofs to present checkpoints on namespace outside nilfs.

Autofs is useful to presents many snapshots or checkpoints automatically, and it allows flexible naming rules.

Maybe we can natively support the magic dot directory, and we may do that if many users demand it or we confront some kind of scalability issue. But, so far it seems to work well enough.

Regards,
Ryusuke

#3 lore raw
In reply to Ryusuke Konishi
Quoted 11 lines · Ryusuke Konishi

Hi,

I've been working for the past serveral months to take review comments and to continually solve users' problems come up in mainling list (thanks for all giving comments and feedbacks!). Also, I've tried to stabilize API and disk format to restrict additional changes and ensure backward compatibility.

Except adding ioctl commands for user-demanded features, I think the interface was almost stabilized. Now I'd like to ask for mainline inclusion so that more people can try this in the tree.

Then submit some patches, as documented in
Documentation/SubmittingPatches :)

thanks,

greg k-h

#4 lore raw

Hi!

Quoted 9 lines · Greg KH
Quoted 8 lines · Ryusuke Konishi

Hi,

I've been working for the past serveral months to take review comments and to continually solve users' problems come up in mainling list (thanks for all giving comments and feedbacks!). Also, I've tried to stabilize API and disk format to restrict additional changes and ensure backward compatibility.

Quoted 8 lines
Quoted 3 lines

Except adding ioctl commands for user-demanded features, I think the interface was almost stabilized. Now I'd like to ask for mainline inclusion so that more people can try this in the tree.

Then submit some patches, as documented in
Documentation/SubmittingPatches :)

thanks,

Sorry for my insufficient explanation.

In my case, the patches are maintained in the -mm tree :)

http://userweb.kernel.org/~akpm/mmotm/

My original post was found in

http://marc.info/?l=linux-fsdevel&m=122141951118758

and

http://marc.info/?l=linux-fsdevel&m=121920195516073 (undivided first post)

Additional patches have been posted to these mailing list, too.

Thanks,
Ryusuke

#5 lore raw
In reply to Ryusuke Konishi
Quoted 2 lines · On Wed, 11 Mar 2009 01:55:42 +0900 (JST) Ryusuke Konishi…

I've been working for the past serveral months to take review comments and to continually solve users' problems come up in mainling list

Yes, the maintenance has been impressive.

Quoted 3 lines

(thanks for all giving comments and feedbacks!). Also, I've tried to stabilize API and disk format to restrict additional changes and ensure backward compatibility.

Well. From the point of view of mainline linux, there is no back-compatibility issue, because the fs hasn't been merged yet.

You perhaps have back-compatibility concerns for existing users of the out-of-tree patch, but I'd encourage you to not worry about that too much - there will be fairly few users and they are probably pretty technical and will be able to cope with a migration. It's a _bit_ hard on them but on the other hand, omitting back-compatibility code leads to a better implementation for the long term.

What you should be more concerned about is forward-compatibility. What arrangements do you presently have in place to be able to later alter the on-disk format without causing too much disruption? Having a strong design here will make changes easier to do and will lead to a better filesystem.

Also.. Don't get _too_ concerned about freezing the on-disk format at this time. You could put in a mount-time printk("the nilfs on-disk format may change at any time - do not place critical data on a nilfs filesystem") and we leave that in place for a few months while things stabilise.

And yes, I was planning on sending nilfs in to Linus for 2.6.30 unless someone has decent-sounding reasons to hold it back.

#6 lore raw

Hi Andrew,

Quoted 7 lines · Andrew Morton
Quoted 2 lines · On Wed, 11 Mar 2009 01:55:42 +0900 (JST) Ryusuke Konishi…

I've been working for the past serveral months to take review comments and to continually solve users' problems come up in mainling list

Yes, the maintenance has been impressive.

Thanks for picking up additional patches at all times!

Quoted 6 lines
Quoted 3 lines

(thanks for all giving comments and feedbacks!). Also, I've tried to stabilize API and disk format to restrict additional changes and ensure backward compatibility.

Well. From the point of view of mainline linux, there is no back-compatibility issue, because the fs hasn't been merged yet.

Oops, sorry, I mistook; it meant forward-compatibility.

My recent patch series and the recent userland tasks were intended to give better support for future extensions though I even tried to keep backward compatibility.

Quoted 6 lines

You perhaps have back-compatibility concerns for existing users of the out-of-tree patch, but I'd encourage you to not worry about that too much - there will be fairly few users and they are probably pretty technical and will be able to cope with a migration. It's a _bit_ hard on them but on the other hand, omitting back-compatibility code leads to a better implementation for the long term.

Thanks for the advice. I'll keep this comment in mind and will handle matters more flexibly with considering long term merits and trade-off.

Quoted 5 lines

What you should be more concerned about is forward-compatibility. What arrangements do you presently have in place to be able to later alter the on-disk format without causing too much disruption? Having a strong design here will make changes easier to do and will lead to a better filesystem.

Yes, I recognize the importance of this. For example, I've carefully converted both userland and kernel code so that they refer to ``size'' fields embeded in on-disk structures instead of calculating with sizeof(). In addition, I paid attention to initialization of reserved fields not to break the forward compatibility.

We arranged various size fields: size of super block, size of segment header, size of on-disk items in meta data files such as inode on ifile, checkpoint entry on cpfile, segment usage entry on sufile, and so forth. All those fields are for handling possible future extensions.

Further, each log of nilfs2 is designed so that it can have additional blocks in the tail. They may be used, for instance, to write additional copies of superblock.

Quoted 5 lines

Also.. Don't get _too_ concerned about freezing the on-disk format at this time. You could put in a mount-time printk("the nilfs on-disk format may change at any time - do not place critical data on a nilfs filesystem") and we leave that in place for a few months while things stabilise.

Got it. So, I will do the message insertion :)

Quoted 2 lines

And yes, I was planning on sending nilfs in to Linus for 2.6.30 unless someone has decent-sounding reasons to hold it back.

Great!

Regards,
Ryusuke Konishi

#7 lore raw
Quoted 8 lines · Ryusuke Konishi
Quoted 5 lines · Andrew Morton

Also.. Don't get _too_ concerned about freezing the on-disk format at this time. You could put in a mount-time printk("the nilfs on-disk format may change at any time - do not place critical data on a nilfs filesystem") and we leave that in place for a few months while things stabilise.

Got it. So, I will do the message insertion :)

I've done this in the mount helper program of nilfs2.

Regards,
Ryusuke

#8 lore raw
In reply to Ryusuke Konishi

2009/3/10 Ryusuke Konishi <[email protected]>:

Quoted 4 lines
 # mount -t nilfs2 -r -o cp=33339 /dev/sdb1 /snap
 (mount the snapshot, then it will become accessible on the mount point)

Is it possible to mount a snapshot rw to make it a branch?
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#9 lore raw

Hi!

Quoted 4 lines · Alex Riesen

2009/3/10 Ryusuke Konishi <[email protected]>:

Quoted 3 lines
# mount -t nilfs2 -r -o cp=33339 /dev/sdb1 /snap
(mount the snapshot, then it will become accessible on the mount=

point)

Quoted 2 lines

Is it possible to mount a snapshot rw to make it a branch?

No, the writable snapshot is not supported.
( So, a readonly option appears in the example. )

Maybe the current design is unfit for efficient branching because nilfs identifies checkpoints with linear numbers and manages lifetime of each on-disk block with a range of the numbers.

We might be able to add a feature like replacing the latest filesystem state with a past snapshot, but it's not yet determined.

Cheers,
Ryusuke