2004-11-07 07:08:56

by Andyliu

[permalink] [raw]
Subject: [PATCH]tar filesystem for 2.6.10-rc1-mm3(easily access tar file)

hi

let's think about the way we access the file which contained in a tar file
may we can untar the whole thing and we find the file we want to access
or we can use the t option with tar to list all the files in the tar
and then untar the only one file we want to access.

but with the help of the tarfs,we can mount a tar file to some dir and access
it easily and quickly.it's like the tarfs in mc.

just mount -t tarfs tarfile.tar /dir/to/mnt -o loop
then access the files easily.

it was writen by Kazuto Miyoshi ([email protected]) Hirokazu
Takahashi ([email protected]) for linux 2.4.0

and i make it work for linux 2.6.0. now a patch for linux 2.6.10-rc1-mm3

the patch is to big to send it as plain text, so i can only send it as
an attachment

thanks
--
Yours andyliu


Attachments:
(No filename) (795.00 B)
tarfs.patch (37.83 kB)
Download all attachments

2004-11-07 07:15:07

by James Tabor

[permalink] [raw]
Subject: Re: [PATCH]tar filesystem for 2.6.10-rc1-mm3(easily access tar file)

andyliu wrote:
> hi
>
> let's think about the way we access the file which contained in a tar file
> may we can untar the whole thing and we find the file we want to access
> or we can use the t option with tar to list all the files in the tar
> and then untar the only one file we want to access.
>
> but with the help of the tarfs,we can mount a tar file to some dir and access
> it easily and quickly.it's like the tarfs in mc.
>
> just mount -t tarfs tarfile.tar /dir/to/mnt -o loop
> then access the files easily.
>
> it was writen by Kazuto Miyoshi ([email protected]) Hirokazu
> Takahashi ([email protected]) for linux 2.4.0
>
> and i make it work for linux 2.6.0. now a patch for linux 2.6.10-rc1-mm3
>
> the patch is to big to send it as plain text, so i can only send it as
> an attachment
>
> thanks
>
Wow! How cool is this! Can you copy files into a tarfs subsystem? Just like
we do with iso's?
Cool,
James

2004-11-07 07:32:29

by Andyliu

[permalink] [raw]
Subject: Re: [PATCH]tar filesystem for 2.6.10-rc1-mm3(easily access tar file)

oh,sorry.it's a readonly filesystem now.i will try to make it writeable.
but i use tar file as loop device.

by the way,if we mount an iso file it's a readonly filesystem too.
i think maybe we should do something on the loop device to support
this kind of write.

On Sun, 07 Nov 2004 07:13:51 +0000, James Tabor
<[email protected]> wrote:
> andyliu wrote:
>
>
> > hi
> >
> > let's think about the way we access the file which contained in a tar file
> > may we can untar the whole thing and we find the file we want to access
> > or we can use the t option with tar to list all the files in the tar
> > and then untar the only one file we want to access.
> >
> > but with the help of the tarfs,we can mount a tar file to some dir and access
> > it easily and quickly.it's like the tarfs in mc.
> >
> > just mount -t tarfs tarfile.tar /dir/to/mnt -o loop
> > then access the files easily.
> >
> > it was writen by Kazuto Miyoshi ([email protected]) Hirokazu
> > Takahashi ([email protected]) for linux 2.4.0
> >
> > and i make it work for linux 2.6.0. now a patch for linux 2.6.10-rc1-mm3
> >
> > the patch is to big to send it as plain text, so i can only send it as
> > an attachment
> >
> > thanks
> >
> Wow! How cool is this! Can you copy files into a tarfs subsystem? Just like
> we do with iso's?
> Cool,
> James
>


--
Yours andyliu

2004-11-07 08:32:23

by Hirokazu Takahashi

[permalink] [raw]
Subject: Re: [PATCH]tar filesystem for 2.6.10-rc1-mm3(easily access tar file)

Hi, Andyliu,

Amazing that you continue our work!
Where did you get the code?

Several years ago, we - Kazuto and I - made the filesystem
just for magazine readers. We designed it as simple as we could,
as it was a sample filesystem to explain about the design and the
implementation of linux filesystems.

I guess there may remain many things to do about it:
- To support tar.gz and tar.bz2. I guess this should be done in
a compression device, which might be md layers or a loop device
itself.
- It may be better if you can make tarent objects free-able
while the filesystem is mounted.
- It may be possible to implement append mode.
A new file can be appended to the filesystem.

We're expecting you to do a good job.

> oh,sorry.it's a readonly filesystem now.i will try to make it writeable.
> but i use tar file as loop device.
>
> by the way,if we mount an iso file it's a readonly filesystem too.
> i think maybe we should do something on the loop device to support
> this kind of write.
>
> On Sun, 07 Nov 2004 07:13:51 +0000, James Tabor
> <[email protected]> wrote:
> > andyliu wrote:
> >
> >
> > > hi
> > >
> > > let's think about the way we access the file which contained in a tar file
> > > may we can untar the whole thing and we find the file we want to access
> > > or we can use the t option with tar to list all the files in the tar
> > > and then untar the only one file we want to access.
> > >
> > > but with the help of the tarfs,we can mount a tar file to some dir and access
> > > it easily and quickly.it's like the tarfs in mc.
> > >
> > > just mount -t tarfs tarfile.tar /dir/to/mnt -o loop
> > > then access the files easily.
> > >
> > > it was writen by Kazuto Miyoshi ([email protected]) Hirokazu
> > > Takahashi ([email protected]) for linux 2.4.0

This address is no longer usable.

> > > and i make it work for linux 2.6.0. now a patch for linux 2.6.10-rc1-mm3
> > >
> > > the patch is to big to send it as plain text, so i can only send it as
> > > an attachment
> > >
> > > thanks
> > >
> > Wow! How cool is this! Can you copy files into a tarfs subsystem? Just like
> > we do with iso's?
> > Cool,
> > James

Thanks,
Hirokazu Takahashi.

2004-11-07 10:25:43

by Felipe Alfaro Solana

[permalink] [raw]
Subject: Re: [PATCH]tar filesystem for 2.6.10-rc1-mm3(easily access tar file)

On Nov 7, 2004, at 08:06, andyliu wrote:

> but with the help of the tarfs,we can mount a tar file to some dir
> and access
> it easily and quickly.it's like the tarfs in mc.
>
> just mount -t tarfs tarfile.tar /dir/to/mnt -o loop
> then access the files easily.

Simply wonderful!

2004-11-07 12:39:14

by Tomasz Kłoczko

[permalink] [raw]
Subject: Re: [PATCH]tar filesystem for 2.6.10-rc1-mm3(easily access tar file)

On Sun, 7 Nov 2004, Felipe Alfaro Solana wrote:

> On Nov 7, 2004, at 08:06, andyliu wrote:
>
>> but with the help of the tarfs,we can mount a tar file to some dir and
>> access
>> it easily and quickly.it's like the tarfs in mc.
>>
>> just mount -t tarfs tarfile.tar /dir/to/mnt -o loop
>> then access the files easily.
>
> Simply wonderful!

Which is ~equal to .. unpack tarfile.tar to /dir/to/mnt :o)

kloczek
--
-----------------------------------------------------------
*Ludzie nie maj? problem?w, tylko sobie sami je stwarzaj?*
-----------------------------------------------------------
Tomasz K?oczko, sys adm @zie.pg.gda.pl|*e-mail: [email protected]*

2004-11-07 13:05:01

by Andyliu

[permalink] [raw]
Subject: Re: [PATCH]tar filesystem for 2.6.10-rc1-mm3(easily access tar file)

On Sun, 07 Nov 2004 17:28:38 +0900 (JST), Hirokazu Takahashi
<[email protected]> wrote:
> Hi, Andyliu,
>
> Amazing that you continue our work!
> Where did you get the code?
Thanks for your code, I got it form your web but i cannot connect to it now.

>
> Several years ago, we - Kazuto and I - made the filesystem
> just for magazine readers. We designed it as simple as we could,
> as it was a sample filesystem to explain about the design and the
> implementation of linux filesystems.
>
I am a newbie.so your simple tar filesystem is good for me to learn
and do something like make it run on 2.6.10-rc1-mm3.

> I guess there may remain many things to do about it:
> - To support tar.gz and tar.bz2. I guess this should be done in
> a compression device, which might be md layers or a loop device
> itself.
> - It may be better if you can make tarent objects free-able
> while the filesystem is mounted.
> - It may be possible to implement append mode.
> A new file can be appended to the filesystem.
>
> We're expecting you to do a good job.
>
I am thinking how to make it support tar.gz type file.I will try my best.
>
>
> > oh,sorry.it's a readonly filesystem now.i will try to make it writeable.
> > but i use tar file as loop device.
> >
> > by the way,if we mount an iso file it's a readonly filesystem too.
> > i think maybe we should do something on the loop device to support
> > this kind of write.
> >
> > On Sun, 07 Nov 2004 07:13:51 +0000, James Tabor
> > <[email protected]> wrote:
> > > andyliu wrote:
> > >
> > >
> > > > hi
> > > >
> > > > let's think about the way we access the file which contained in a tar file
> > > > may we can untar the whole thing and we find the file we want to access
> > > > or we can use the t option with tar to list all the files in the tar
> > > > and then untar the only one file we want to access.
> > > >
> > > > but with the help of the tarfs,we can mount a tar file to some dir and access
> > > > it easily and quickly.it's like the tarfs in mc.
> > > >
> > > > just mount -t tarfs tarfile.tar /dir/to/mnt -o loop
> > > > then access the files easily.
> > > >
> > > > it was writen by Kazuto Miyoshi ([email protected]) Hirokazu
> > > > Takahashi ([email protected]) for linux 2.4.0
>
> This address is no longer usable.
>
>
>
> > > > and i make it work for linux 2.6.0. now a patch for linux 2.6.10-rc1-mm3
> > > >
> > > > the patch is to big to send it as plain text, so i can only send it as
> > > > an attachment
> > > >
> > > > thanks
> > > >
> > > Wow! How cool is this! Can you copy files into a tarfs subsystem? Just like
> > > we do with iso's?
> > > Cool,
> > > James
>
> Thanks,
> Hirokazu Takahashi.
>
>


--
Yours andyliu

2004-11-07 13:08:15

by Andyliu

[permalink] [raw]
Subject: Re: [PATCH]tar filesystem for 2.6.10-rc1-mm3(easily access tar file)

On Sun, 7 Nov 2004 13:38:54 +0100 (CET), Tomasz Kłoczko
<[email protected]> wrote:
> On Sun, 7 Nov 2004, Felipe Alfaro Solana wrote:
>
>
>
> > On Nov 7, 2004, at 08:06, andyliu wrote:
> >
> >> but with the help of the tarfs,we can mount a tar file to some dir and
> >> access
> >> it easily and quickly.it's like the tarfs in mc.
> >>
> >> just mount -t tarfs tarfile.tar /dir/to/mnt -o loop
> >> then access the files easily.
> >
> > Simply wonderful!
>
> Which is ~equal to .. unpack tarfile.tar to /dir/to/mnt :o)
if the tarfile.tar contain huge little file and unpack it will cost
time and much disk space.

but this filesystem reduce time and use none disk space but it use ram

have you ever use mc's tarfs,they are a little like.
>
> kloczek
> --
> -----------------------------------------------------------
> *Ludzie nie mają problemów, tylko sobie sami je stwarzają*
> -----------------------------------------------------------
> Tomasz Kłoczko, sys adm @zie.pg.gda.pl|*e-mail: [email protected]*
>


--
Yours andyliu

2004-11-07 13:43:03

by Kazuto MIYOSHI

[permalink] [raw]
Subject: Re: [PATCH]tar filesystem for 2.6.10-rc1-mm3(easily access tar file)


Hi,

I am surprised that good old thing is appearing on 2.6 :-)
Hirokazu already pointed out some issues, and my major concern for
the code is that tar archiving mechanism is duplicated (embedded)
into the kernel directly.

BTW, have you looked at LUFS? (Linux Userland Filesystem)
I have not look at it closely, but it sounds it may help you.

Best Regards,
--
Kazuto Miyoshi [email protected]

2004-11-07 13:49:15

by Tomasz Kłoczko

[permalink] [raw]
Subject: Re: [PATCH]tar filesystem for 2.6.10-rc1-mm3(easily access tar file)

On Sun, 7 Nov 2004, andyliu wrote:
[..]
>>> Simply wonderful!
>>
>> Which is ~equal to .. unpack tarfile.tar to /dir/to/mnt :o)
> if the tarfile.tar contain huge little file and unpack it will cost
> time and much disk space.

1) This tarfs code have only RO support. Prepare RW acces for tar nball
file structure will not be so trivial.
2) If You want save disk space for small files with also RO access
only better will be spend some time on romfs for extend them for allow
operate on slightly bigger file systeme than curreent lmitation this fs.
Packing to tar file will be functionaly equal to generate romfs image
using genromfs.
3) Maybe I'm wrong but IIRC raiserfs have block suballocation. If I'm
wrong (about current raiserfs) btter will be write and use some fs with
this kind feacture.
4) Huge or very huge amout of small files it is usulaly case on filesystem
for mail spool. It need RW access. Subject was many tilme in past
discussed and can be find on archives aroud mailfs or mailstorfs
words. Tar ball structure isn't specialized for allow fast RW operation.
In cases where speed isn't issue tarfs will be fuctional equivalet to romfs.

Count of cases where tarfs will be useable will be probably very close to
cout of cases where romfs is used now. All without add single line of code
on kernel level :-)

tarfs it is *good* code example but IMO .. only example :_)

kloczek
--
-----------------------------------------------------------
*Ludzie nie maj? problem?w, tylko sobie sami je stwarzaj?*
-----------------------------------------------------------
Tomasz K?oczko, sys adm @zie.pg.gda.pl|*e-mail: [email protected]*

2004-11-07 14:47:34

by Hirokazu Takahashi

[permalink] [raw]
Subject: Re: [PATCH]tar filesystem for 2.6.10-rc1-mm3(easily access tar file)

Hi,

This filesystem was designed as an educational material.

However, I guess it may be used to maintain many tar archives
as they are. This is a good point that nobody should have to care
about archive/filesystem formats.

I think saving disk space is secondary effect, which wouldn't be
important.

> [..]
> >>> Simply wonderful!
> >>
> >> Which is ~equal to .. unpack tarfile.tar to /dir/to/mnt :o)
> > if the tarfile.tar contain huge little file and unpack it will cost
> > time and much disk space.
>
> 1) This tarfs code have only RO support. Prepare RW acces for tar nball
> file structure will not be so trivial.
> 2) If You want save disk space for small files with also RO access
> only better will be spend some time on romfs for extend them for allow
> operate on slightly bigger file systeme than curreent lmitation this fs.
> Packing to tar file will be functionaly equal to generate romfs image
> using genromfs.
> 3) Maybe I'm wrong but IIRC raiserfs have block suballocation. If I'm
> wrong (about current raiserfs) btter will be write and use some fs with
> this kind feacture.
> 4) Huge or very huge amout of small files it is usulaly case on filesystem
> for mail spool. It need RW access. Subject was many tilme in past
> discussed and can be find on archives aroud mailfs or mailstorfs
> words. Tar ball structure isn't specialized for allow fast RW operation.
> In cases where speed isn't issue tarfs will be fuctional equivalet to romfs.
>
> Count of cases where tarfs will be useable will be probably very close to
> cout of cases where romfs is used now. All without add single line of code
> on kernel level :-)
>
> tarfs it is *good* code example but IMO .. only example :_)
>
> kloczek
> --
> -----------------------------------------------------------
> *Ludzie nie maj? problem?w, tylko sobie sami je stwarzaj?*
> -----------------------------------------------------------
> Tomasz K?oczko, sys adm @zie.pg.gda.pl|*e-mail: [email protected]*