07 Jan, 2012

1 commit


04 Jan, 2012

2 commits

  • Signed-off-by: Al Viro

    Al Viro
     
  • Move invalidate_bdev, block_sync_page into fs/block_dev.c. Export
    kill_bdev as well, so brd doesn't have to open code it. Reduce
    buffer_head.h requirement accordingly.

    Removed a rather large comment from invalidate_bdev, as it looked a bit
    obsolete to bother moving. The small comment replacing it says enough.

    Signed-off-by: Nick Piggin
    Cc: Al Viro
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Al Viro

    Al Viro
     

18 Jul, 2011

1 commit


14 Jan, 2011

1 commit

  • Generate a unique inode numbers for any entries in the cram file system.
    For files which did not contain data's (device nodes, fifos and sockets)
    the offset of the directory entry inside the cramfs plus 1 will be used as
    inode number.

    The + 1 for the inode will it make possible to distinguish between a file
    which contains no data and files which has data, the later one has a inode
    value where the lower two bits are always 0.

    It also reimplements the behavior to set the size and the number of block
    to 0 for special file, which is the right value for empty files, devices,
    fifos and sockets

    As a little benefit it will be also more compatible which older mkcramfs,
    because it will never use the cramfs_inode->offset for creating a inode
    number for special files.

    [akpm@linux-foundation.org: trivial comment fix]
    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Stefani Seibold
    Cc: Al Viro
    Cc: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stefani Seibold
     

29 Oct, 2010

1 commit


18 Aug, 2010

1 commit

  • Commit 77b8a75f5bb introduced a warning at fs/inode.c:692 unlock_new_inode(),
    caused by unlock_new_inode() being called on existing inodes as well.

    This patch changes setup_inode() to only call unlock_new_inode() for I_NEW
    inodes.

    Signed-off-by: Alexander Shishkin
    Signed-off-by: Al Viro

    Alexander Shishkin
     

10 Aug, 2010

1 commit

  • simply don't hash the inodes that don't have real inumber instead of
    skipping them during iget5_locked(); as the result, simple iget_locked()
    would do and we can get rid of cramfs ->drop_inode() as well.

    Signed-off-by: Al Viro

    Al Viro
     

03 Apr, 2009

2 commits


22 Jan, 2009

1 commit


06 Jan, 2009

1 commit


21 Aug, 2008

1 commit

  • After commit a97c9bf33f4612e2aed6f000f6b1d268b6814f3c (fix cramfs
    making duplicate entries in inode cache) in kernel 2.6.14, named-pipe
    on cramfs does not work properly.

    It seems the commit make all named-pipe on cramfs share their inode
    (and named-pipe buffer).

    Make ..._test() refuse to merge inodes with ->i_ino == 1, take inode setup
    back to get_cramfs_inode() and make ->drop_inode() evict ones with ->i_ino
    == 1 immediately.

    Reported-by: Atsushi Nemoto
    Cc: Al Viro
    Cc: [2.6.14 and later]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     

19 Apr, 2008

1 commit


19 Oct, 2007

2 commits


17 Oct, 2007

1 commit

  • The README file in the cramfs subdirectory says: "All data is currently in
    host-endian format; neither mkcramfs nor the kernel ever do swabbing."

    If somebody tries to mount a cramfs with the wrong endianess, cramfs only
    complains about a wrong magic but doesn't inform the user that only the
    endianess isn't right.

    The following patch adds an error message to the cramfs sources. If a user
    tries to mount a cramfs with the wrong endianess using the patched sources,
    cramfs will display the message "cramfs: wrong endianess".

    Signed-off-by: Andi Drebes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Drebes
     

08 May, 2007

1 commit

  • Ensure pages are uptodate after returning from read_cache_page, which allows
    us to cut out most of the filesystem-internal PageUptodate calls.

    I didn't have a great look down the call chains, but this appears to fixes 7
    possible use-before uptodate in hfs, 2 in hfsplus, 1 in jfs, a few in
    ecryptfs, 1 in jffs2, and a possible cleared data overwritten with readpage in
    block2mtd. All depending on whether the filler is async and/or can return
    with a !uptodate page.

    Signed-off-by: Nick Piggin
    Cc: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

13 Feb, 2007

2 commits

  • This patch is inspired by Arjan's "Patch series to mark struct
    file_operations and struct inode_operations const".

    Compile tested with gcc & sparse.

    Signed-off-by: Josef 'Jeff' Sipek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josef 'Jeff' Sipek
     
  • Many struct inode_operations in the kernel can be "const". Marking them const
    moves these to the .rodata section, which avoids false sharing with potential
    dirty data. In addition it'll catch accidental writes at compile time to
    these shared resources.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

09 Dec, 2006

1 commit


08 Dec, 2006

1 commit

  • Steve Grubb's fzfuzzer tool (http://people.redhat.com/sgrubb/files/
    fsfuzzer-0.6.tar.gz) generates corrupt Cramfs filesystems which cause
    Cramfs to kernel oops in cramfs_uncompress_block(). The cause of the oops
    is an unchecked corrupted block length field read by cramfs_readpage().

    This patch adds a sanity check to cramfs_readpage() which checks that the
    block length field is sensible. The (PAGE_CACHE_SIZE << 1) size check is
    intentional, even though the uncompressed data is not going to be larger
    than PAGE_CACHE_SIZE, gzip sometimes generates compressed data larger than
    the original source data. Mkcramfs checks that the compressed size is
    always less than or equal to PAGE_CACHE_SIZE << 1. Of course Cramfs could
    use the original uncompressed data in this case, but it doesn't.

    Signed-off-by: Phillip Lougher
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Phillip Lougher
     

30 Sep, 2006

2 commits


27 Sep, 2006

2 commits


29 Jun, 2006

1 commit


23 Jun, 2006

3 commits

  • Add read_mapping_page() which is used for callers that pass
    mapping->a_ops->readpage as the filler for read_cache_page. This removes
    some duplication from filesystem code.

    Signed-off-by: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pekka Enberg
     
  • Give the statfs superblock operation a dentry pointer rather than a superblock
    pointer.

    This complements the get_sb() patch. That reduced the significance of
    sb->s_root, allowing NFS to place a fake root there. However, NFS does
    require a dentry to use as a target for the statfs operation. This permits
    the root in the vfsmount to be used instead.

    linux/mount.h has been added where necessary to make allyesconfig build
    successfully.

    Interest has also been expressed for use with the FUSE and XFS filesystems.

    Signed-off-by: David Howells
    Acked-by: Al Viro
    Cc: Nathan Scott
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Extend the get_sb() filesystem operation to take an extra argument that
    permits the VFS to pass in the target vfsmount that defines the mountpoint.

    The filesystem is then required to manually set the superblock and root dentry
    pointers. For most filesystems, this should be done with simple_set_mnt()
    which will set the superblock pointer and then set the root dentry to the
    superblock's s_root (as per the old default behaviour).

    The get_sb() op now returns an integer as there's now no need to return the
    superblock pointer.

    This patch permits a superblock to be implicitly shared amongst several mount
    points, such as can be done with NFS to avoid potential inode aliasing. In
    such a case, simple_set_mnt() would not be called, and instead the mnt_root
    and mnt_sb would be set directly.

    The patch also makes the following changes:

    (*) the get_sb_*() convenience functions in the core kernel now take a vfsmount
    pointer argument and return an integer, so most filesystems have to change
    very little.

    (*) If one of the convenience function is not used, then get_sb() should
    normally call simple_set_mnt() to instantiate the vfsmount. This will
    always return 0, and so can be tail-called from get_sb().

    (*) generic_shutdown_super() now calls shrink_dcache_sb() to clean up the
    dcache upon superblock destruction rather than shrink_dcache_anon().

    This is required because the superblock may now have multiple trees that
    aren't actually bound to s_root, but that still need to be cleaned up. The
    currently called functions assume that the whole tree is rooted at s_root,
    and that anonymous dentries are not the roots of trees which results in
    dentries being left unculled.

    However, with the way NFS superblock sharing are currently set to be
    implemented, these assumptions are violated: the root of the filesystem is
    simply a dummy dentry and inode (the real inode for '/' may well be
    inaccessible), and all the vfsmounts are rooted on anonymous[*] dentries
    with child trees.

    [*] Anonymous until discovered from another tree.

    (*) The documentation has been adjusted, including the additional bit of
    changing ext2_* into foo_* in the documentation.

    [akpm@osdl.org: convert ipath_fs, do other stuff]
    Signed-off-by: David Howells
    Acked-by: Al Viro
    Cc: Nathan Scott
    Cc: Roland Dreier
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

29 Mar, 2006

1 commit

  • This is a conversion to make the various file_operations structs in fs/
    const. Basically a regexp job, with a few manual fixups

    The goal is both to increase correctness (harder to accidentally write to
    shared datastructures) and reducing the false sharing of cachelines with
    things that get dirty in .data (while .rodata is nicely read only and thus
    cache clean)

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

27 Mar, 2006

1 commit

  • Semaphore to mutex conversion.

    The conversion was generated via scripts, and the result was validated
    automatically via a script as well.

    Signed-off-by: Ingo Molnar
    Cc: Eric Van Hensbergen
    Cc: Robert Love
    Cc: Thomas Gleixner
    Cc: David Woodhouse
    Cc: Neil Brown
    Cc: Trond Myklebust
    Cc: Dave Kleikamp
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

07 Mar, 2006

1 commit

  • Fix handling of cramfs images created by util-linux containing empty
    regular files. Images created by cramfstools 1.x were ok.

    Fill out inode contents in cramfs_iget5_set() instead of get_cramfs_inode()
    to prevent issues if cramfs_iget5_test() is called with I_LOCK|I_NEW still
    set.

    Signed-off-by: Dave Johnson
    Cc: Olaf Hering
    Cc: Chris Mason
    Cc: Andreas Gruenbacher
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Johnson
     

11 Sep, 2005

1 commit


08 Sep, 2005

1 commit

  • Every time cramfs_lookup() is called to lookup and inode for a dentry,
    get_cramfs_inode() will allocate a new inode without checking to see if that
    inode already exists in the inode cache.

    This is fine the first time, but if the dentry cache entry(ies) associated
    with that inode are aged out, but the inode entry is not aged out (which can
    be quite common if the inode has buffer cache linked to it), cramfs_lookup()
    will be called again and another inode will be allocated and added to the
    inode cache creating a duplicate in the inode cache.

    The big issue here is that the buffers associated with each inode cache entry
    are not shared between the duplicates!

    The older inode entries are now orphaned as no dentry points to it and won't
    be freed until the buffer cache assoicated with them are first freed. The
    newest entry will have to create all new buffer cache for each part of its
    file as the old buffer cache is now orphaned as well.

    Patch below fixes this by making get_cramfs_inode() use the inode cache before
    blindly creating a new entry every time. This eliminates the duplicate inodes
    and duplicate buffer cache.

    Cc: Phillip Lougher
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Johnson
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds