17 Oct, 2007

4 commits

  • I_LOCK was used for several unrelated purposes, which caused deadlock
    situations in certain filesystems as a side effect. One of the purposes
    now uses the new I_SYNC bit.

    Also document the various bits and change their order from historical to
    logical.

    [bunk@stusta.de: make fs/inode.c:wake_up_inode() static]
    Signed-off-by: Joern Engel
    Cc: Dave Kleikamp
    Cc: David Chinner
    Cc: Anton Altaparmakov
    Cc: Al Viro
    Cc: Christoph Hellwig
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joern Engel
     
  • Miklos Szeredi and me identified a writeback bug:

    > The following strange behavior can be observed:
    >
    > 1. large file is written
    > 2. after 30 seconds, nr_dirty goes down by 1024
    > 3. then for some time (< 30 sec) nothing happens (disk idle)
    > 4. then nr_dirty again goes down by 1024
    > 5. repeat from 3. until whole file is written
    >
    > So basically a 4Mbyte chunk of the file is written every 30 seconds.
    > I'm quite sure this is not the intended behavior.

    It can be produced by the following test scheme:

    # cat bin/test-writeback.sh
    grep nr_dirty /proc/vmstat
    echo 1 > /proc/sys/fs/inode_debug
    dd if=/dev/zero of=/var/x bs=1K count=204800&
    while true; do grep nr_dirty /proc/vmstat; sleep 1; done

    # bin/test-writeback.sh
    nr_dirty 19207
    nr_dirty 19207
    nr_dirty 30924
    204800+0 records in
    204800+0 records out
    209715200 bytes (210 MB) copied, 1.58363 seconds, 132 MB/s
    nr_dirty 47150
    nr_dirty 47141
    nr_dirty 47142
    nr_dirty 47142
    nr_dirty 47142
    nr_dirty 47142
    nr_dirty 47205
    nr_dirty 47214
    nr_dirty 47214
    nr_dirty 47214
    nr_dirty 47214
    nr_dirty 47214
    nr_dirty 47215
    nr_dirty 47216
    nr_dirty 47216
    nr_dirty 47216
    nr_dirty 47154
    nr_dirty 47143
    nr_dirty 47143
    nr_dirty 47143
    nr_dirty 47143
    nr_dirty 47143
    nr_dirty 47142
    nr_dirty 47142
    nr_dirty 47142
    nr_dirty 47142
    nr_dirty 47134
    nr_dirty 47134
    nr_dirty 47135
    nr_dirty 47135
    nr_dirty 47135
    nr_dirty 46097 pages_skipped != pages_skipped) {
    544 /*
    545 * writeback is not making progress due to locked
    546 * buffers. Skip this inode for now.
    547 */
    548 redirty_tail(inode);
    549 }

    More debug efforts show that __block_write_full_page()
    never has the chance to call submit_bh() for that big dirty file:
    the buffer head is *clean*. So basicly no page io is issued by
    __block_write_full_page(), hence pages_skipped goes up.

    Also the comment in generic_sync_sb_inodes():

    544 /*
    545 * writeback is not making progress due to locked
    546 * buffers. Skip this inode for now.
    547 */

    and the comment in __block_write_full_page():

    1713 /*
    1714 * The page was marked dirty, but the buffers were
    1715 * clean. Someone wrote them back by hand with
    1716 * ll_rw_block/submit_bh. A rare case.
    1717 */

    do not quite agree with each other. The page writeback should be skipped for
    'locked buffer', but here it is 'clean buffer'!

    This patch fixes this bug. Though I'm not sure why __block_write_full_page()
    is called only to do nothing and who actually issued the writeback for us.

    This is the two possible new behaviors after the patch:

    1) pretty nice: wait 30s and write ALL:)
    2) not so good:
    - during the dd: ~16M
    - after 30s: ~4M
    - after 5s: ~4M
    - after 5s: ~176M

    The next patch will fix case (2).

    Cc: David Chinner
    Cc: Ken Chen
    Signed-off-by: Fengguang Wu
    Signed-off-by: David Chinner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fengguang Wu
     
  • 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: David Chinner
    Cc: Timothy Shimmin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     

12 Oct, 2007

1 commit


10 Oct, 2007

1 commit

  • As bi_end_io is only called once when the reqeust is complete,
    the 'size' argument is now redundant. Remove it.

    Now there is no need for bio_endio to subtract the size completed
    from bi_size. So don't do that either.

    While we are at it, change bi_end_io to return void.

    Signed-off-by: Neil Brown
    Signed-off-by: Jens Axboe

    NeilBrown
     

01 Oct, 2007

1 commit

  • This reverts commit b394e43e995d08821588a22561c6a71a63b4ff27.

    Lachlan McIlroy says:
    It tried to fix an issue where log replay is replaying an inode cluster
    initialisation transaction that should not be replayed because the inode
    cluster on disk is more up to date. Since we don't log file sizes (we
    rely on inode flushing to get them to disk) then we can't just replay
    all the transations in the log and expect the inode to be completely
    restored. We lose file size updates. Unfortunately this fix is causing
    more (serious) problems than it is fixing.

    SGI-PV: 969656
    SGI-Modid: xfs-linux-melb:xfs-kern:29804a

    Signed-off-by: Lachlan McIlroy
    Signed-off-by: Tim Shimmin

    Tim Shimmin
     

20 Sep, 2007

2 commits

  • The new xlog_recover_do_reg_buffer checks call be16_to_cpu on di_gen which
    is a 32bit value so sparse rightly complains. Fortunately the warning is
    harmless because we don't care for the value, but only whether it's
    non-NULL. Due to that fact we can simply kill the endian swaps on this and
    the previous di_mode check entirely.

    SGI-PV: 969656
    SGI-Modid: xfs-linux-melb:xfs-kern:29709a

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Lachlan McIlroy
    Signed-off-by: Tim Shimmin

    Christoph Hellwig
     
  • xfs_filestream_mount() sets up an mru cache with:
    err = xfs_mru_cache_create(&mp->m_filestream, lifetime, grp_count,
    (xfs_mru_cache_free_func_t)xfs_fstrm_free_func);
    but that cast is causing problems...
    typedef void (*xfs_mru_cache_free_func_t)(unsigned long, void*);
    but:
    void xfs_fstrm_free_func( xfs_ino_t ino, fstrm_item_t *item)
    so on a 32-bit box, it's casting (32, 32) args into (64, 32) and I assume
    it's getting garbage for *item, which subsequently causes an explosion.
    With this change the filestreams xfsqa tests don't oops on my 32-bit box.

    SGI-PV: 967795
    SGI-Modid: xfs-linux-melb:xfs-kern:29510a

    Signed-off-by: Eric Sandeen
    Signed-off-by: David Chinner
    Signed-off-by: Tim Shimmin

    Eric Sandeen
     

18 Sep, 2007

2 commits


17 Sep, 2007

1 commit

  • Instead of running the mru cache reaper all the time based on a timeout,
    we should only run it when the cache has active objects. This allows CPUs
    to sleep when there is no activity rather than be woken repeatedly just to
    check if there is anything to do.

    SGI-PV: 968554
    SGI-Modid: xfs-linux-melb:xfs-kern:29305a

    Signed-off-by: David Chinner
    Signed-off-by: Donald Douwsma
    Signed-off-by: Tim Shimmin

    David Chinner
     

05 Sep, 2007

6 commits

  • This git mod: 77e4635ae191774526ed695482a151ac986f3806
    converted to a "greedy" allocation interface, but for the quota hashtables
    it switched from allocating XFS_QM_HASHSIZE (nr of elements)
    xfs_dqhash_t's to allocating only XFS_QM_HASHSIZE *bytes* - quite a lot
    smaller! Then when we converted hsize "back" to nr of elements (the
    division line) hsize went to 0. This was leading to oopses when running
    any quota tests on the Fedora 8 test kernel, but the problem has been
    there for almost a year.

    SGI-PV: 968837
    SGI-Modid: xfs-linux-melb:xfs-kern:29354a

    Signed-off-by: Eric Sandeen
    Signed-off-by: David Chinner
    Signed-off-by: Tim Shimmin

    Eric Sandeen
     
  • - in xfs_probe_cluster rename the inner len to pg_len. There's no harm
    here because the outer len isn't used after the inner len comes into
    existence but it keeps the code clean.
    - in xfs_da_do_buf remove the inner i because they don't overlap
    and they are both the same type.

    SGI-PV: 968555
    SGI-Modid: xfs-linux-melb:xfs-kern:29311a

    Signed-off-by: Christoph Hellwig
    Signed-off-by: David Chinner
    Signed-off-by: Tim Shimmin

    Christoph Hellwig
     
  • - remove the != 0 inside the unlikely in ASSERT_ALWAYS because sparse now
    complains about comparisons between pointers and 0
    - add a standalone ASSERT implementation because defining it to
    ASSERT_ALWAYS means the string is expanded before the token passing
    stringification. This way we get the actual content of the
    assertion in the assfail message and don't overflow sparse's
    stringification buffer leading to sparse error messages.

    SGI-PV: 968555
    SGI-Modid: xfs-linux-melb:xfs-kern:29310a

    Signed-off-by: Christoph Hellwig
    Signed-off-by: David Chinner
    Signed-off-by: Tim Shimmin

    Christoph Hellwig
     
  • We can't return a masked result of a __bitwise type. Compare it to 0 first
    to keep the behaviour without the warning.

    SGI-PV: 968555
    SGI-Modid: xfs-linux-melb:xfs-kern:29309a

    Signed-off-by: Christoph Hellwig
    Signed-off-by: David Chinner
    Signed-off-by: Tim Shimmin

    Christoph Hellwig
     
  • Sparse now warns about comparing pointers to 0, so change all instance
    where that happens to NULL instead.

    SGI-PV: 968555
    SGI-Modid: xfs-linux-melb:xfs-kern:29308a

    Signed-off-by: Christoph Hellwig
    Signed-off-by: David Chinner
    Signed-off-by: Tim Shimmin

    Christoph Hellwig
     
  • SGI-PV: 968554
    SGI-Modid: xfs-linux-melb:xfs-kern:29303a

    Signed-off-by: David Chinner
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Tim Shimmin

    David Chinner
     

27 Jul, 2007

1 commit


20 Jul, 2007

5 commits

  • 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
     
  • * 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6:
    [XFS] Fix inode size update before data write in xfs_setattr
    [XFS] Allow punching holes to free space when at ENOSPC
    [XFS] Implement ->page_mkwrite in XFS.
    [FS] Implement block_page_mkwrite.

    Manually fix up conflict with Nick's VM fault handling patches in
    fs/xfs/linux-2.6/xfs_file.c

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Change ->fault prototype. We now return an int, which contains
    VM_FAULT_xxx code in the low byte, and FAULT_RET_xxx code in the next byte.
    FAULT_RET_ code tells the VM whether a page was found, whether it has been
    locked, and potentially other things. This is not quite the way he wanted
    it yet, but that's changed in the next patch (which requires changes to
    arch code).

    This means we no longer set VM_CAN_INVALIDATE in the vma in order to say
    that a page is locked which requires filemap_nopage to go away (because we
    can no longer remain backward compatible without that flag), but we were
    going to do that anyway.

    struct fault_data is renamed to struct vm_fault as Linus asked. address
    is now a void __user * that we should firmly encourage drivers not to use
    without really good reason.

    The page is now returned via a page pointer in the vm_fault struct.

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

    Nick Piggin
     
  • Nonlinear mappings are (AFAIKS) simply a virtual memory concept that encodes
    the virtual address -> file offset differently from linear mappings.

    ->populate is a layering violation because the filesystem/pagecache code
    should need to know anything about the virtual memory mapping. The hitch here
    is that the ->nopage handler didn't pass down enough information (ie. pgoff).
    But it is more logical to pass pgoff rather than have the ->nopage function
    calculate it itself anyway (because that's a similar layering violation).

    Having the populate handler install the pte itself is likewise a nasty thing
    to be doing.

    This patch introduces a new fault handler that replaces ->nopage and
    ->populate and (later) ->nopfn. Most of the old mechanism is still in place
    so there is a lot of duplication and nice cleanups that can be removed if
    everyone switches over.

    The rationale for doing this in the first place is that nonlinear mappings are
    subject to the pagefault vs invalidate/truncate race too, and it seemed stupid
    to duplicate the synchronisation logic rather than just consolidate the two.

    After this patch, MAP_NONBLOCK no longer sets up ptes for pages present in
    pagecache. Seems like a fringe functionality anyway.

    NOPAGE_REFAULT is removed. This should be implemented with ->fault, and no
    users have hit mainline yet.

    [akpm@linux-foundation.org: cleanup]
    [randy.dunlap@oracle.com: doc. fixes for readahead]
    [akpm@linux-foundation.org: build fix]
    Signed-off-by: Nick Piggin
    Signed-off-by: Randy Dunlap
    Cc: Mark Fasheh
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • Fix the race between invalidate_inode_pages and do_no_page.

    Andrea Arcangeli identified a subtle race between invalidation of pages from
    pagecache with userspace mappings, and do_no_page.

    The issue is that invalidation has to shoot down all mappings to the page,
    before it can be discarded from the pagecache. Between shooting down ptes to
    a particular page, and actually dropping the struct page from the pagecache,
    do_no_page from any process might fault on that page and establish a new
    mapping to the page just before it gets discarded from the pagecache.

    The most common case where such invalidation is used is in file truncation.
    This case was catered for by doing a sort of open-coded seqlock between the
    file's i_size, and its truncate_count.

    Truncation will decrease i_size, then increment truncate_count before
    unmapping userspace pages; do_no_page will read truncate_count, then find the
    page if it is within i_size, and then check truncate_count under the page
    table lock and back out and retry if it had subsequently been changed (ptl
    will serialise against unmapping, and ensure a potentially updated
    truncate_count is actually visible).

    Complexity and documentation issues aside, the locking protocol fails in the
    case where we would like to invalidate pagecache inside i_size. do_no_page
    can come in anytime and filemap_nopage is not aware of the invalidation in
    progress (as it is when it is outside i_size). The end result is that
    dangling (->mapping == NULL) pages that appear to be from a particular file
    may be mapped into userspace with nonsense data. Valid mappings to the same
    place will see a different page.

    Andrea implemented two working fixes, one using a real seqlock, another using
    a page->flags bit. He also proposed using the page lock in do_no_page, but
    that was initially considered too heavyweight. However, it is not a global or
    per-file lock, and the page cacheline is modified in do_no_page to increment
    _count and _mapcount anyway, so a further modification should not be a large
    performance hit. Scalability is not an issue.

    This patch implements this latter approach. ->nopage implementations return
    with the page locked if it is possible for their underlying file to be
    invalidated (in that case, they must set a special vm_flags bit to indicate
    so). do_no_page only unlocks the page after setting up the mapping
    completely. invalidation is excluded because it holds the page lock during
    invalidation of each page (and ensures that the page is not mapped while
    holding the lock).

    This also allows significant simplifications in do_no_page, because we have
    the page locked in the right place in the pagecache from the start.

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

    Nick Piggin
     

19 Jul, 2007

3 commits

  • When changing the file size by a truncate() call, we log the change in the
    inode size. However, we do not flush any outstanding data that might not
    have been written to disk, thereby violating the data/inode size update
    order. This can leave files full of NULLs on crash.

    Hence if we are truncating the file, flush any unwritten data that may lie
    between the curret on disk inode size and the new inode size that is being
    logged to ensure that ordering is preserved.

    SGI-PV: 966308
    SGI-Modid: xfs-linux-melb:xfs-kern:29174a

    Signed-off-by: David Chinner
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Tim Shimmin

    David Chinner
     
  • Make the free file space transaction able to dip into the reserved blocks
    to ensure that we can successfully free blocks when the filesystem is at
    ENOSPC.

    SGI-PV: 967788
    SGI-Modid: xfs-linux-melb:xfs-kern:29167a

    Signed-off-by: David Chinner
    Signed-off-by: Vlad Apostolov
    Signed-off-by: Tim Shimmin

    David Chinner
     
  • Hook XFS up to ->page_mkwrite to ensure that we know about mmap pages
    being written to. This allows use to do correct delayed allocation and
    ENOSPC checking as well as remap unwritten extents so that they get
    converted correctly during writeback. This is done via the generic
    block_page_mkwrite code.

    SGI-PV: 940392
    SGI-Modid: xfs-linux-melb:xfs-kern:29149a

    Signed-off-by: David Chinner
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Tim Shimmin

    David Chinner
     

18 Jul, 2007

3 commits

  • currently the export_operation structure and helpers related to it are in
    fs.h. fs.h is already far too large and there are very few places needing the
    export bits, so split them off into a separate header.

    [akpm@linux-foundation.org: fix cifs build]
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Neil Brown
    Cc: Steven French
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • Currently, the freezer treats all tasks as freezable, except for the kernel
    threads that explicitly set the PF_NOFREEZE flag for themselves. This
    approach is problematic, since it requires every kernel thread to either
    set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't
    care for the freezing of tasks at all.

    It seems better to only require the kernel threads that want to or need to
    be frozen to use some freezer-related code and to remove any
    freezer-related code from the other (nonfreezable) kernel threads, which is
    done in this patch.

    The patch causes all kernel threads to be nonfreezable by default (ie. to
    have PF_NOFREEZE set by default) and introduces the set_freezable()
    function that should be called by the freezable kernel threads in order to
    unset PF_NOFREEZE. It also makes all of the currently freezable kernel
    threads call set_freezable(), so it shouldn't cause any (intentional)
    change of behaviour to appear. Additionally, it updates documentation to
    describe the freezing of tasks more accurately.

    [akpm@linux-foundation.org: build fixes]
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Nigel Cunningham
    Cc: Pavel Machek
    Cc: Oleg Nesterov
    Cc: Gautham R Shenoy
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • I can never remember what the function to register to receive VM pressure
    is called. I have to trace down from __alloc_pages() to find it.

    It's called "set_shrinker()", and it needs Your Help.

    1) Don't hide struct shrinker. It contains no magic.
    2) Don't allocate "struct shrinker". It's not helpful.
    3) Call them "register_shrinker" and "unregister_shrinker".
    4) Call the function "shrink" not "shrinker".
    5) Reduce the 17 lines of waffly comments to 13, but document it properly.

    Signed-off-by: Rusty Russell
    Cc: David Chinner
    Cc: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     

14 Jul, 2007

10 commits

  • SGI-PV: 967035
    SGI-Modid: xfs-linux-melb:xfs-kern:29026a

    Signed-off-by: David Chinner
    Signed-off-by: Tim Shimmin

    David Chinner
     
  • * 32bit struct xfs_fsop_bulkreq has different size and layout of
    members, no matter the alignment. Move the code out of the #else
    branch (why was it there in the first place?). Define _32 variants of
    the ioctl constants.
    * 32bit struct xfs_bstat is different because of time_t and on
    i386 because of different padding. Make xfs_bulkstat_one() accept a
    custom "output formatter" in the private_data argument which takes care
    of the xfs_bulkstat_one_compat() that takes care of the different
    layout in the compat case.
    * i386 struct xfs_inogrp has different padding.
    Add a similar "output formatter" mecanism to xfs_inumbers().

    SGI-PV: 967354
    SGI-Modid: xfs-linux-melb:xfs-kern:29102a

    Signed-off-by: Michal Marek
    Signed-off-by: David Chinner
    Signed-off-by: Tim Shimmin

    Michal Marek
     
  • 32bit struct xfs_fsop_handlereq has different size and offsets (due to
    pointers). TODO: case XFS_IOC_{FSSETDM,ATTRLIST,ATTRMULTI}_BY_HANDLE still
    not handled.

    SGI-PV: 967354
    SGI-Modid: xfs-linux-melb:xfs-kern:29101a

    Signed-off-by: Michal Marek
    Signed-off-by: David Chinner
    Signed-off-by: Tim Shimmin

    Michal Marek
     
  • i386 struct xfs_fsop_geom_v1 has no padding after the last member, so the
    size is different.

    SGI-PV: 967354
    SGI-Modid: xfs-linux-melb:xfs-kern:29100a

    Signed-off-by: Michal Marek
    Signed-off-by: David Chinner
    Signed-off-by: Tim Shimmin

    Michal Marek
     
  • Remove the hardcoded "fnames" for tracing, and just embed them in tracing
    macros via __FUNCTION__. Kills a lot of #ifdefs too.

    SGI-PV: 967353
    SGI-Modid: xfs-linux-melb:xfs-kern:29099a

    Signed-off-by: Eric Sandeen
    Signed-off-by: David Chinner
    Signed-off-by: Tim Shimmin

    Eric Sandeen
     
  • Avoid using a special "zero inode" as the parent of the quota inode as
    this can confuse the filestreams code into thinking the quota inode has a
    parent. We do not want the quota inode to follow filestreams allocation
    rules, so pass a NULL as the parent inode and detect this condition when
    doing stream associations.

    SGI-PV: 964469
    SGI-Modid: xfs-linux-melb:xfs-kern:29098a

    Signed-off-by: David Chinner
    Signed-off-by: Tim Shimmin

    David Chinner
     
  • In media spaces, video is often stored in a frame-per-file format. When
    dealing with uncompressed realtime HD video streams in this format, it is
    crucial that files do not get fragmented and that multiple files a placed
    contiguously on disk.

    When multiple streams are being ingested and played out at the same time,
    it is critical that the filesystem does not cross the streams and
    interleave them together as this creates seek and readahead cache miss
    latency and prevents both ingest and playout from meeting frame rate
    targets.

    This patch set creates a "stream of files" concept into the allocator to
    place all the data from a single stream contiguously on disk so that RAID
    array readahead can be used effectively. Each additional stream gets
    placed in different allocation groups within the filesystem, thereby
    ensuring that we don't cross any streams. When an AG fills up, we select a
    new AG for the stream that is not in use.

    The core of the functionality is the stream tracking - each inode that we
    create in a directory needs to be associated with the directories' stream.
    Hence every time we create a file, we look up the directories' stream
    object and associate the new file with that object.

    Once we have a stream object for a file, we use the AG that the stream
    object point to for allocations. If we can't allocate in that AG (e.g. it
    is full) we move the entire stream to another AG. Other inodes in the same
    stream are moved to the new AG on their next allocation (i.e. lazy
    update).

    Stream objects are kept in a cache and hold a reference on the inode.
    Hence the inode cannot be reclaimed while there is an outstanding stream
    reference. This means that on unlink we need to remove the stream
    association and we also need to flush all the associations on certain
    events that want to reclaim all unreferenced inodes (e.g. filesystem
    freeze).

    SGI-PV: 964469
    SGI-Modid: xfs-linux-melb:xfs-kern:29096a

    Signed-off-by: David Chinner
    Signed-off-by: Barry Naujok
    Signed-off-by: Donald Douwsma
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Tim Shimmin
    Signed-off-by: Vlad Apostolov

    David Chinner
     
  • Appease gcc in regards to "warning: 'rtx' is used uninitialized in
    this function".

    SGI-PV: 907752
    SGI-Modid: xfs-linux-melb:xfs-kern:29007a

    Signed-off-by: Andrew Morton
    Signed-off-by: Tim Shimmin

    Andrew Morton
     
  • A check for file_count is always a bad idea. Linux has the ->release
    method to deal with cleanups on last close and ->flush is only for the
    very rare case where we want to perform an operation on every drop of a
    reference to a file struct.

    This patch gets rid of vop_close and surrounding code in favour of simply
    doing the page flushing from ->release.

    SGI-PV: 966562
    SGI-Modid: xfs-linux-melb:xfs-kern:28952a

    Signed-off-by: Christoph Hellwig
    Signed-off-by: David Chinner
    Signed-off-by: Tim Shimmin

    Christoph Hellwig
     
  • SGI-PV: 966576
    SGI-Modid: xfs-linux-melb:xfs-kern:28950a

    Signed-off-by: Vignesh Babu
    Signed-off-by: David Chinner
    Signed-off-by: Tim Shimmin

    Vignesh Babu