agement, hixosfs music extends the inode definition
with a struct tag.
The struct tag has four fields for a total of about
100 byte of stored information, theoretically an
i-node can be extended until 4 kb then it’s possible
to customize it with many tags for your purpose.
It’s convenient to choose tags that are most of the
time used in the file search to di-scriminate the files
depending their content. We chose here what was
able to maximize the time of search musical files
by most commonly used criteria as album or author
name and so on.
A new module have been created, the Hixosfs
module that includes hixosfs operations defini-
tion. Certain functions as hixosfs read inode,
hixosfs update inode and hixosfs new inode don’t
differ too much respect to read and update for ext2 file
system. In addition there is a new part for the man-
agement of the new content based file attribute in the
struct iattr and inode. Finally two new system calls
Chtag and retag have been implemented to allow to
write and read the struct tag from hixos inode.
All described modification have been done start-
ing from 2.6.23 kernel, but can easily integrated in
newer kernel versions. Beside standard user mode
tools (stat, chmod, ls and so on), specific command
are needed to directly handle with new file tags.
There are two kind of user space programs hixosfs
requires, to read/write tags from/to inodes and as well
to interface with the tag based file management of-
fered by hixosfs. At the first group belong programs
as statmusic (think at shell command stat) and
chmusic (think at chown and so on), at the second
orderby, ls, find, with an intuitive meaning.
3 EXTENDED ATTRIBUTES
Currently Linux fs as ext2 (Remy Card), ext3, reis-
erfs allows to manage with metainformation related
to a file with xattr feature. Patching the kernel with
xattr you have a way to extend inode attributes that
doesn’t physically modify the inode struct. This is
possible since in xattr the attributes are stored as a
couple attribute-value out of the inode as a variable
length string. Generally the basic command used to
deal with extended attributes in Xattr is attr that
allows to specifies different options to set and get at-
tribute values, to remove attributes to list all of them
and then to read or writes these values to standard out-
put. The programs we implemented in our testing sce-
nario are based on this user space tool.
4 FILE SYSTEM IN USERSPACE
FUSE is an open source project with GPL and LGPL
license that offers a Linux kernel module to allow
to not privileged users to create their own fs without
write kernel level code, in fact customizing fuse you
can create your own fully functional fs directly in user
space. This approach is used to write virtual fs, that
don’t care about store data on the disk but of arranging
them to offer a virtual view of such data to the final
user. For the MMFS design please refers to (Corriero,
2008).
5 PERFORMANCE MEASURES
In this section performance measurements made on
hixosfs are presented. The monitored operation are
about reading e writing tags from and to a file, read-
ing from disk the folders content, the operation of
ordering a group of files with user passed parame-
ters. The time required to perform this operations
by hixosfs has been measured and compared with the
time needed in the some situation by:
• a fuse based file system approach, specially mu-
sicmeshfs (MMFS)
• xattr Linux fs feature
• an ad hoc user space program
All analyzed case have in common a musical
files processing phase application based on TagLib
C(Wheeler, 2008) library to extract musical tags such
as author, track, title year, album. The time it-
self has been measured by the unix command time
command1 that gives as output the execution times
of input command command1. As you can expect
the study shows that performing such operations with
hixosfs gives an huge optimization in term of time
since it works in kernel mode with operating system
privileges. Every action done for the discovery of in-
formation involves a system call and then a software
interrupt for each system call.
To work with hixosfs music and related user mode
tools you have to to patch and recompile the kernel
source, to compile user space programs, to create a
hixosfs fs (ext2-modified) with a 256 byte inode by,
e.g, mkfs.ext2 -I 256 ... and finally to mount
hixosfs fs in your tree To test his way of working and
then do performance comparisons, after preparing the
system, we populated the fs with a collection of 80 Gb
of musical data. The main command used to add files
inside the hixosfs music is addmusic and the sintax is:
addmusic FILENAME | FOLDERNAME
SIGMAP 2009 - International Conference on Signal Processing and Multimedia Applications
190