Re: 2.6.2-rc2 nfsd+xfs spins in i_size_read()

From: Nathan Scott (nathans_at_sgi.com)
Date: 01/31/04

  • Next message: Andrew Morton: "Re: 2.6.2-rc2 nfsd+xfs spins in i_size_read()"
    Date:	Sat, 31 Jan 2004 10:07:34 +1100
    To: Andrew Morton <akpm@osdl.org>
    
    

    On Fri, Jan 30, 2004 at 02:34:59PM -0800, Andrew Morton wrote:
    > Miquel van Smoorenburg <miquels@cistron.nl> wrote:
    > > What lock exactly is supposed to protect i_size_write, since it
    > > appears that i_size_write is being called without proper locking ?
    > > (Am I right?)
    >
    > If two CPUs hit i_size_write() at the same time we have a bug. That
    > function requires that the caller provide external serialisation, via i_sem.

    Hmm... I suspect we may not always be providing that in XFS -
    I'll go audit our calls.

    > Try adding this to the start of i_size_write():
    >
    > if (down_trylock(&inode->i_sem) == 0) {
    > printk("I am buggy\n");
    > dump_stack();
    > up(&inode->i_sem);
    > }

    Let me know what you hit Miquel :) - I'll run the XFS tests
    next week with this too and see what I can find.

    thanks.

    -- 
    Nathan
    -
    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: Andrew Morton: "Re: 2.6.2-rc2 nfsd+xfs spins in i_size_read()"

    Relevant Pages

    • Re: [PATCH][2.6-mm] i386: enable interrupts on contention in spin_lock_irq
      ... > scheduler often gets called with interrupts disabled ... I'll run with the debug code and audit any suspect ones. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: LVM2
      ... XFS is an SGI project. ... >>Disk size: What are you doing with it. ... >>>Please read the FAQ at http://www.tux.org/lkml/ ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: I request inclusion of reiser4 in the mainline kernel
      ... > Maybe xfs shouldn't be accepted too, ... Was this code first written in some language which compiles into C, ... whether you like the code style or not. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] page->flags corruption fix
      ... > race condition will still be safe when XFS is merged? ... free_pages as said if it's buggy, then it can still trigger no matter ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: 2.6.0-test9 XFS problem
      ... Mandrake Linux 9.2 Kernel 2.6.0-test9 XFS. ... Registered BSD User 51101. ... Registered Linux User #213309. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)