[Parted-edge] Libraries for file-systems

Andrew Clausen clausen at econ.upenn.edu
Sat Oct 20 18:44:37 UTC 2007


Here's my (irrelevant?) 2 cents: There are two problems with using
command line wrappers:

 - accessing devices.  I don't know how it would be possible to
implement "resize-the-start" reasonably by directly accessing the device
through the OS.  That is, if the start is expanded, then how is the
new space addressed?
	I suspect the solution is to have fake devices that allow
you to address the union of the new and old storage space.  This can
probably be implemented by intercepting syscalls, or some kind of
userspace device driver.

 - error handling.  Each library has different error codes that don't
map cleanly onto libparted error codes.  I suppose a crude solution is
ok.  The main requirements are that bad errors cause the whole thing
to abort, minor errors can be easily configured to be ignored, and
all errors can be translated into clear messages for the user.

So, I think these problems are solvable.

On Sat, Oct 20, 2007 at 04:31:26PM +0530, Debarshi 'Rishi' Ray wrote:
> I was looking for the libraries that are available for working with
> specific file-systems, in order for us to start working on the VFS.
> This what I could come up with:
> 
> Ext2/Ext3: Libext2fs from e2fsprogs
> (http://e2fsprogs.sourceforge.net/). However as David pointed out,
> this has a licensing issue (GPLv2) and can't be used with Parted
> (GPLv3+) right now.
> 
> ReiserFS: Libreiserfs from progsreiserfs
> (http://reiserfs.osdn.org.ua/) as mentioned in the Parted manual.
> Progsreiserfs aspires to be an alternative of the reiserfsprogs
> (ftp://ftp.namesys.com/pub/reiserfsprogs/) as small and nice frontends
> to this library. However the last release is on 10 January, 2003. This
> is much earlier than the current reiserfsprogs release.
> 
> NTFS: The choice is between libntfs-3g from NTFS-3G
> (http://ntfs-3g.org/) and libntfs from Linux-NTFS
> (http://www.linux-ntfs.org/doku.php). However, Szabolcs Szakacsits who
> has worked on both projects advises us to wrap the NTFS command-line
> utilities, which are currently based on Linux-NTFS. He plans to port
> the utilities to NTFS-3G in the near future. According to him, trying
> to use the NTFS libraries is not advisable since that is going to be
> very very complicated, as compared to Vfat or Ext2/Ext3.
> 
> As for the other filesystems, I could not find any libraries yet.
> GParted directly wraps the utilities (eg., mkfs.xfs, mkfs.jfs, etc.)
> to support the operations not provided by Libparted.
> 
> What would be the next step forward?
> 
> Happy hacking,
> Debarshi
> -- 
> GPG key ID: 63D4A5A7
> Key server: pgp.mit.edu



More information about the Parted-edge mailing list