tar filesystem for 2.6.10-rc1-mm3(easily access tar file)
PATCH 1/1 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
Signature · 1 line
Yours andyliu
fs/Kconfig +6 -0
@@ -1007,6 +1007,12 @@ To compile this as a module, choose M here: the module will be called ramfs. + +config TAR_FS + tristate "Tar fs support" + help + tarfs can help you mount a .tar file. then you can access the files in the + tar easily. endmenu
fs/Makefile +1 -0
@@ -97,3 +97,4 @@ obj-$(CONFIG_HOSTFS) += hostfs/ obj-$(CONFIG_HPPFS) += hppfs/ obj-$(CONFIG_CACHEFS) += cachefs/ +obj-$(CONFIG_TAR_FS) += tarfs/
fs/tarfs/dir.c +99 -0
99 lines not on this page · raw message
fs/tarfs/file.c +75 -0
75 lines not on this page · raw message
fs/tarfs/inode.c +123 -0
123 lines not on this page · raw message
fs/tarfs/Makefile +8 -0
@@ -0,0 +1,8 @@ +# +# Makefile for the linux tarfs-filesystem routines. +# +# + +obj-$(CONFIG_TAR_FS) += tarfs.o + +tarfs-y := dir.o file.o inode.o namei.o super.o tarent.o
fs/tarfs/namei.c +52 -0
52 lines not on this page · raw message
fs/tarfs/README +10 -0
@@ -0,0 +1,10 @@ +tarfs was writen by +Kazuto Miyoshi ([email protected]) +Hirokazu Takahashi ([email protected]) + +in 2001 for linux 2.4.0 + +and I port it to run on Linux 2.6.* in 2004 + +deyan liu [email protected] +
fs/tarfs/super.c +215 -0
215 lines not on this page · raw message
fs/tarfs/tarent.c +608 -0
608 lines not on this page · raw message
fs/tarfs/tarfs.h +118 -0
118 lines not on this page · raw message
fs/tarfs/tarinf.h +115 -0
115 lines not on this page · raw message
A message that is not in the archive (sent off-list or not yet received): [email protected]
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.
Quoted 31 lines · James Tabor
Quoted 16 lines · andyliu
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
Quoted 7 lines
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
Signature · 1 line
Yours andyliu
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.
Quoted 27 lines
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.
Quoted 18 lines · James Tabor
Quoted 15 lines · andyliu
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.
Quoted 11 lines
Quoted 11 lines
Quoted 7 lines
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.
Quoted 4 lines · Hirokazu Takahashi
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.
Quoted 6 lines
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.
Quoted 11 lines
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.
Quoted 50 lines
Quoted 5 lines
oh,sorry.it's a readonly filesystem now.i will try to make it writeable. but i use tar file as loop device.
Quoted 24 lines
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.
Quoted 18 lines · James Tabor
Quoted 15 lines · andyliu
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.
Quoted 11 lines
Quoted 11 lines
Quoted 7 lines
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,
JamesThanks,
Hirokazu Takahashi.
Signature · 1 line
Yours andyliu
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]
Quoted 6 lines · andyliu
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!
Quoted 10 lines · Felipe Alfaro Solana
Quoted 6 lines · andyliu
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
Signature · 4 lines
----------------------------------------------------------- *Ludzie nie mają problemów, tylko sobie sami je stwarzają* ----------------------------------------------------------- Tomasz Kłoczko, sys adm @zie.pg.gda.pl|*e-mail: [email protected]*
Quoted 10 lines · Tomasz Kłoczko
Quoted 6 lines · Felipe Alfaro Solana
Quoted 4 lines · andyliu
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.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
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.
Quoted 8 lines
kloczek
--
-----------------------------------------------------------
*Ludzie nie mają problemów, tylko sobie sami je stwarzają*
-----------------------------------------------------------
Tomasz Kłoczko, sys adm @zie.pg.gda.pl|*e-mail: [email protected]*
Signature · 1 line
Yours andyliu
On Sun, 7 Nov 2004, andyliu wrote:
[..]
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
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
Signature · 4 lines
----------------------------------------------------------- *Ludzie nie mają problemów, tylko sobie sami je stwarzają* ----------------------------------------------------------- Tomasz Kłoczko, sys adm @zie.pg.gda.pl|*e-mail: [email protected]*
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.
Quoted 35 lines
[..]
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
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
Signature · 4 lines
----------------------------------------------------------- *Ludzie nie mają problemów, tylko sobie sami je stwarzają* ----------------------------------------------------------- Tomasz Kłoczko, sys adm @zie.pg.gda.pl|*e-mail: [email protected]*