Re: [PATCH]a tar filesystem for 2.6.10-rc1-mm3

From: Pavel Machek (pavel_at_ucw.cz)
Date: 11/11/04

  • Next message: Pavel Machek: "Re: Xen 2.0 Officially Released!"
    Date:	Thu, 11 Nov 2004 00:42:03 +0100
    To: andyliu <liudeyan@gmail.com>
    
    

    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 (kaz@earth.email.ne.jp) Hirokazu
    > Takahashi (h-takaha@mub.biglobe.ne.jp) 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

    Hmm, at least it needs to be indented by tab, see
    Documentation/CodingStyle. If it could do compressed tars... well I
    could find a use for _that_...
                                                                            Pavel

    > +static int tarfs_readdir(struct file * filp,
    > + void * dirent, filldir_t filldir)
    > +{
    > + struct inode *inode = filp->f_dentry->d_inode;
    > + int err;
    > + struct tarent *dir_tarent, *ent;
    > + int dtype=0;
    > + int count, stored;
    > +
    > + dir_tarent = TARENT(inode);
    > +
    > + message("tarfs: tarfs_readdir (dir_tarent %p, f_pos %ld)\n",
    > + dir_tarent, (long)filp->f_pos);
    > +

    -- 
    People were complaining that M$ turns users into beta-testers...
    ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Pavel Machek: "Re: Xen 2.0 Officially Released!"

    Relevant Pages

    • tar: directory checksum error
      ... I have a shell script that unzips and untars nearly 25 files and makes ... the message "tar: directory checksum error" ... If I do untar each file individually it works fine. ... This is free software; see the source for copying conditions. ...
      (comp.unix.solaris)
    • Re: Installing .tar files
      ... > usually put it in my Documents directory and untar it from there. ... Where you ultimately put the tar file's contents once untarred depends on ... When you extract it, you'll ... to the usual 'make install' part, called checkinstall, which creates and ...
      (alt.os.linux.suse)
    • strange tar problem
      ... I found some strange tar problem on some of my Solaris 8 boxes. ... Trying to untar archive with long path I'm receiving error on one machine when all is ok on another. ...
      (comp.unix.solaris)
    • Re: strange tar problem
      ... I found some strange tar problem on some of my Solaris 8 boxes. ... Trying to untar archive with long path I'm receiving error on one machine when all is ok on another. ... Solaris 8 2/02 s28s_u7wos_08a SPARC ...
      (comp.unix.solaris)
    • Re: Converting ext3->XFS
      ... >>with odd permissions, tar it, untar it, and see what happens. ... > Ahh, i had tried this already, but i just did the untar as root and it works. ...
      (Debian-User)