20 Mar, 2008

1 commit

  • fs/ufs/balloc.c: In function `ufs_change_blocknr':
    fs/ufs/balloc.c:317: warning: long long unsigned int format, long unsigned int arg (arg 2)
    fs/ufs/balloc.c:317: warning: long long unsigned int format, long unsigned int arg (arg 3)

    sector_t is u64 and we don't know what type the architecture uses to implement
    u64.

    Cc: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

24 Feb, 2008

1 commit

  • This bug snuck in with

    commit 252e211e90ce56bf005cb533ad5a297c18c19407
    Author: Mark Fortescue
    Date: Tue Oct 16 23:26:31 2007 -0700

    Add in SunOS 4.1.x compatible mode for UFS

    Signed-off-by: Roel Kluin
    Acked-by: Evgeniy Dushistov
    Cc: Mark Fortescue
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roel Kluin
     

09 Feb, 2008

2 commits

  • Per previous discussions about cleaning up ufs_fs.h, people just want
    this straight up dropped from userspace export. The only remaining
    consumer (silo) has been fixed a while ago to not rely on this header.
    This allows use to move it completely from include/linux/ to fs/ufs/
    seeing as how the only in-kernel consumer is fs/ufs/.

    Signed-off-by: Mike Frysinger
    Cc: Jan Kara
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • If we create symlink on UFS2 filesystem under Linux, it looks wrong under
    other OSes, because of max symlink length field was not initialized
    properly, and data blocks were not used to save short symlink names.

    [akpm@linux-foundation.org: add missing fs32_to_cpu()]
    Signed-off-by: Evgeniy Dushistov
    Cc: Steven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     

08 Feb, 2008

1 commit

  • Stop the UFS filesystem from using iget() and read_inode(). Replace
    ufs_read_inode() with ufs_iget(), and call that instead of iget(). ufs_iget()
    then uses iget_locked() directly and returns a proper error code instead of an
    inode in the event of an error.

    ufs_fill_super() returns any error incurred when getting the root inode
    instead of EINVAL.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: David Howells
    Cc: Evgeniy Dushistov
    Acked-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

06 Dec, 2007

1 commit

  • This patch fixes regression, introduced since 2.6.16. NextStep variant of
    UFS as OpenStep uses directory block size equals to 1024. Without this
    change, ufs_check_page fails in many cases.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Evgeniy Dushistov
    Cc: Dave Bailey
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     

30 Oct, 2007

1 commit

  • Evgeniy said:

    I wonder on what type of UFS do you test this patch? NetBSD and FreeBSD
    do not use "fs_state", they use "fs_clean" flag, only Solaris does check
    like this: fs_state + fs_time == FSOK.

    That's why parentheses was like that.

    At now with linux-2.6.24-rc1-git1, I get: fs need fsck, but NetBSD's fsck
    says that's all ok.

    I suggest revert this patch.

    Cc: Evgeniy Dushistov
    Cc: Satyam Sharma
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

17 Oct, 2007

6 commits

  • The current code skips the check to verify whether the filesystem was
    previously cleanly unmounted, if (flags & UFS_ST_MASK) == UFS_ST_44BSD or
    UFS_ST_OLD. This looks like an inadvertent bug that slipped in due to
    parantheses in the compound conditional to me, especially given that
    ufs_get_fs_state() handles the UFS_ST_44BSD case perfectly well. So, let's
    fix the compound condition appropriately.

    Signed-off-by: Satyam Sharma
    Cc: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Satyam Sharma
     
  • Move prototypes and in-core structures to fs/ufs/ similar to what most
    other filesystems already do.

    I made little modifications: move also ufs debug macros and
    mount options constants into fs/ufs/ufs.h, this stuff
    also private for ufs.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Evgeniy Dushistov
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • An implementation of show_options method for UFS.

    Signed-off-by: Evgeniy Dushistov
    Cc: "Randy.Dunlap"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     
  • Add in support for SunOS 4.1.x flavor of BSD 4.2 UFS filing system Macros have
    been put in to alow suport for the old static table Cylinder Groups but this
    implementation does not use them yet.

    This also fixes Solaris UFS filing system access by disabling fast symbolic
    links as Sun's version of UFS does not support on-disk fast symbolic links.

    Tested by:
    Ppartitioning a new disk using SunOS 4.1.1, creating a UFS filing system on
    one of the partitions and writing some files to the filing system.
    Using Linux-2.6.22 (patched) to read the files and then write a shed load of
    files to the UFS partition.
    Using SunOS 4.1.1 to verify the filing system is OK and to check the files.
    The test host is a sun4c SS1 Clone.

    [akpm@linux-foundation.org: coding style fixes]
    [adobriyan@gmail.com: fix oops]
    Signed-off-by: Mark Fortescue
    Cc: Evgeniy Dushistov
    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark
     
  • Slab constructors currently have a flags parameter that is never used. And
    the order of the arguments is opposite to other slab functions. The object
    pointer is placed before the kmem_cache pointer.

    Convert

    ctor(void *object, struct kmem_cache *s, unsigned long flags)

    to

    ctor(struct kmem_cache *s, void *object)

    throughout the kernel

    [akpm@linux-foundation.org: coupla fixes]
    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Signed-off-by: Nick Piggin
    Cc: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

25 Sep, 2007

1 commit

  • Different types of ufs hold state in different places, to hide complexity
    of this, there is ufs_get_fs_state, it returns state according to
    "UFS_SB(sb)->s_flags", but during mount ufs_get_fs_state is called, before
    setting s_flags, this cause message for ufs types like sun ufs: "fs need
    fsck", and remount in readonly state.

    Signed-off-by: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     

20 Jul, 2007

1 commit

  • Slab destructors were no longer supported after Christoph's
    c59def9f222d44bb7e2f0a559f2906191a0862d7 change. They've been
    BUGs for both slab and slub, and slob never supported them
    either.

    This rips out support for the dtor pointer from kmem_cache_create()
    completely and fixes up every single callsite in the kernel (there were
    about 224, not including the slab allocator definitions themselves,
    or the documentation references).

    Signed-off-by: Paul Mundt

    Paul Mundt
     

17 Jul, 2007

1 commit


10 Jul, 2007

1 commit


17 May, 2007

1 commit

  • SLAB_CTOR_CONSTRUCTOR is always specified. No point in checking it.

    Signed-off-by: Christoph Lameter
    Cc: David Howells
    Cc: Jens Axboe
    Cc: Steven French
    Cc: Michael Halcrow
    Cc: OGAWA Hirofumi
    Cc: Miklos Szeredi
    Cc: Steven Whitehouse
    Cc: Roman Zippel
    Cc: David Woodhouse
    Cc: Dave Kleikamp
    Cc: Trond Myklebust
    Cc: "J. Bruce Fields"
    Cc: Anton Altaparmakov
    Cc: Mark Fasheh
    Cc: Paul Mackerras
    Cc: Christoph Hellwig
    Cc: Jan Kara
    Cc: David Chinner
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

09 May, 2007

1 commit


08 May, 2007

2 commits

  • I have never seen a use of SLAB_DEBUG_INITIAL. It is only supported by
    SLAB.

    I think its purpose was to have a callback after an object has been freed
    to verify that the state is the constructor state again? The callback is
    performed before each freeing of an object.

    I would think that it is much easier to check the object state manually
    before the free. That also places the check near the code object
    manipulation of the object.

    Also the SLAB_DEBUG_INITIAL callback is only performed if the kernel was
    compiled with SLAB debugging on. If there would be code in a constructor
    handling SLAB_DEBUG_INITIAL then it would have to be conditional on
    SLAB_DEBUG otherwise it would just be dead code. But there is no such code
    in the kernel. I think SLUB_DEBUG_INITIAL is too problematic to make real
    use of, difficult to understand and there are easier ways to accomplish the
    same effect (i.e. add debug code before kfree).

    There is a related flag SLAB_CTOR_VERIFY that is frequently checked to be
    clear in fs inode caches. Remove the pointless checks (they would even be
    pointless without removeal of SLAB_DEBUG_INITIAL) from the fs constructors.

    This is the last slab flag that SLUB did not support. Remove the check for
    unimplemented flags from SLUB.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • 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
     

18 Apr, 2007

1 commit

  • This patch should fix or partly fix this bug:
    http://bugzilla.kernel.org/show_bug.cgi?id=8276

    The problem is:

    - if we see "zero link case" during reading inode operation, we call
    ufs_error(which remount fs readonly), but not "mark" inode as bad (1)

    - in readonly case we do not fill some data structures, which are used in
    read and write case (2)

    - VFS call ufs_delete_inode if link count is zero (3)

    so (1)->(3)->(2) cause oops, this patch should fix such scenario

    Signed-off-by: Evgeniy Dushistov
    Cc: Jim Paris
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     

17 Mar, 2007

4 commits

  • During modification of code to support UFS2 writing, the case with
    "three indirect" blocks in truncate path was missed, this patch fixes
    this situation.

    Signed-off-by: Evgeniy Dushistov
    Acked-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     
  • This patch fix behaviour in such test scenario:

    lseek(fd, BIG_OFFSET)
    write(fd, buf, sizeof(buf))
    truncate(BIG_OFFSET)
    truncate(BIG_OFFSET + sizeof(buf))
    read(fd, buf...)

    Because of if file big enough(BIG_OFFSET) we start allocate space by block,
    ordinary block size > page size, so we should zeroize the rest of block in
    truncate(except last framgnet, about which VFS should care), to not get
    garbage, when we extend file.

    Also patch corrects conversion from pointer to block to physical block number,
    this helps in case of not common used UFS types.

    And add to debug output inode number.

    Signed-off-by: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     
  • This fixes "change blocks numbers on the fly" in case when "prepare
    write page" is in the call chain, in this case some buffers may be not
    uptodate and not mapped, we should care to map them and load from disk.

    This patch was tested with:
    - ufs regressions simple tests
    - fsx-linux
    - ltp(20060306)
    - untar and build kernel

    Signed-off-by: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     
  • This patch corrects work with time in UFS2 case.

    1) According to UFS2 disk layout modification/access and so on "time"
    should be hold in two variables one 64bit for seconds and another 32bit for
    nanoseconds,

    at now for some unknown reason we suppose that "inode time" holds in
    three variables 32bit for seconds, 32bit for milliseconds and 32bit for
    nanoseconds.

    2) We set amount of nanoseconds in "VFS inode" to 0 during read, instead of
    getting values from "on disk inode"(this should close
    http://bugzilla.kernel.org/show_bug.cgi?id=7991).

    Signed-off-by: Evgeniy Dushistov
    Cc: Bjoern Jacke
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     

15 Feb, 2007

1 commit

  • After Al Viro (finally) succeeded in removing the sched.h #include in module.h
    recently, it makes sense again to remove other superfluous sched.h includes.
    There are quite a lot of files which include it but don't actually need
    anything defined in there. Presumably these includes were once needed for
    macros that used to live in sched.h, but moved to other header files in the
    course of cleaning it up.

    To ease the pain, this time I did not fiddle with any header files and only
    removed #includes from .c-files, which tend to cause less trouble.

    Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
    arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
    allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
    configs in arch/arm/configs on arm. I also checked that no new warnings were
    introduced by the patch (actually, some warnings are removed that were emitted
    by unnecessarily included header files).

    Signed-off-by: Tim Schmielau
    Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     

13 Feb, 2007

5 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
     
  • Patch adds ability to work with 64bit metadata, this made by replacing work
    with 32bit pointers by inline functions.

    Signed-off-by: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     
  • This patch adds into write inode path function to write UFS2 inode, and
    modifys allocate inode path to allocate and init additional inode chunks.

    Also some cleanups:
    - remove not used parameters in some functions
    - remove i_gen field from ufs_inode_info structure,
    there is i_generation in inode structure with same purposes.

    Signed-off-by: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     
  • These series of patches add UFS2 write-support. UFS2 - is default file system
    for recent versions of FreeBSD.

    The main differences from UFS1 from write support point of view
    are:
    1)Not all inodes are allocated during formatation of disk.
    2)All meta-data(pointer to data blocks) are 64bit(in UFS1 they
    are 32bit).

    So patch series consist of
    1)make possible mount UFS2 in read-write mode
    2)code to write ufs2 inodes and code to initialize inodes chunks.
    3)work with 64bit meta-data

    I made simple testing like create/deleting/writing/reading/truncating, also I
    ran fsx-linux and untar and build kernel on UFS1 and UFS2, after that FreeBSD
    fsck do not find any errors in fs.

    This patch makes possible to mount ufs2 "rw", and updates UFS2 documentation:
    remove note about bug(it fixed by reallocate blocks on the fly patch) and add
    me in the list of people who want receive bug reports.

    Signed-off-by: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     

10 Feb, 2007

1 commit

  • This is a fix of regression, which triggered by ~2.6.16.

    Patch with name ufs-directory-and-page-cache-from-blocks-to-pages.patch: in
    additional to conversation from block to page cache mechanism added new
    checks of directory integrity, one of them that directory entry do not
    across directory chunks.

    But some kinds of UFS: OpenStep UFS and Apple UFS (looks like these are the
    same filesystems) have different directory chunk size, then common
    UFSes(BSD and Solaris UFS).

    So this patch adds ability to works with variable size of directory chunks,
    and set it for ufstype=openstep to right size.

    Tested on darwin ufs.

    Signed-off-by: Evgeniy Dushistov
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     

31 Jan, 2007

3 commits

  • In blocks reallocation function sometimes does not update some of
    buffer_head::b_blocknr, which may and cause data damage.

    Signed-off-by: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     
  • During ufs_trunc_direct which is subroutine of ufs::truncate, we try the first
    of all free parts of block and then whole blocks. But we calculate size of
    block's part to free in the wrong way.

    This may cause bad update of used blocks and fragments statistic, and you can
    got report that you have free 32T on 1Gb partition.

    Signed-off-by: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     
  • These series of patches result of UFS1 write support stress testing, like
    running fsx-linux, untar and build linux kernel etc

    We pass from ufs::get_block_t to levels below: pointer to the current page, to
    make possible things like reallocation of blocks on the fly, and we also uses
    this pointer for indication, what actually we allocate data block or meta data
    block, but currently we make decision about what we allocate on the wrong
    level, this may and cause oops if we allocate blocks in some special order.

    Signed-off-by: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Evgeniy Dushistov
     

06 Jan, 2007

1 commit

  • Looks like this is the problem, which point Al Viro some time ago:

    ufs's get_block callback allocates 16k of disk at a time, and links that
    entire 16k into the file's metadata. But because get_block is called for only
    a single buffer_head (a 2k buffer_head in this case?) we are only able to tell
    the VFS that this 2k is buffer_new().

    So when ufs_getfrag_block() is later called to map some more data in the file,
    and when that data resides within the remaining 14k of this fragment,
    ufs_getfrag_block() will incorrectly return a !buffer_new() buffer_head.

    I don't see _right_ way to do nullification of whole block, if use inode
    page cache, some pages may be outside of inode limits (inode size), and
    will be lost; if use blockdev page cache it is possible to zero real data,
    if later inode page cache will be used.

    The simpliest way, as can I see usage of block device page cache, but not only
    mark dirty, but also sync it during "nullification". I use my simple tests
    collection, which I used for check that create,open,write,read,close works on
    ufs, and I see that this patch makes ufs code 18% slower then before.

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

    Evgeniy Dushistov
     

09 Dec, 2006

1 commit


08 Dec, 2006

2 commits