13 Sep, 2011

26 commits

  • The dca_lock can be taken in atomic context:

    [ 25.607536] Call Trace:
    [ 25.607557] [] try_stack_unwind+0x151/0x1a0
    [ 25.607566] [] dump_trace+0x92/0x370
    [ 25.607573] [] show_trace_log_lvl+0x5c/0x80
    [ 25.607578] [] show_trace+0x15/0x20
    [ 25.607587] [] dump_stack+0x77/0x8f
    [ 25.607595] [] __might_sleep+0x11a/0x130
    [ 25.607602] [] rt_spin_lock+0x83/0x90
    [ 25.607611] [] dca_common_get_tag+0x28/0x80 [dca]
    [ 25.607622] [] dca3_get_tag+0x18/0x20 [dca]
    [ 25.607634] [] igb_update_dca+0xb1/0x1d0 [igb]
    [ 25.607649] [] igb_setup_dca+0x65/0x80 [igb]
    [ 25.607663] [] igb_probe+0x946/0xe4d [igb]
    [ 25.607678] [] local_pci_probe+0x17/0x20
    [ 25.607686] [] pci_device_probe+0x121/0x130
    [ 25.607699] [] driver_probe_device+0xd2/0x2e0
    [ 25.607707] [] __driver_attach+0x9b/0xa0
    [ 25.607714] [] bus_for_each_dev+0x6b/0xa0
    [ 25.607720] [] driver_attach+0x21/0x30
    [ 25.607727] [] bus_add_driver+0x1e5/0x350
    [ 25.607734] [] driver_register+0x81/0x160
    [ 25.607742] [] __pci_register_driver+0x6f/0xf0
    [ 25.607752] [] igb_init_module+0x5b/0x5d [igb]
    [ 25.607769] [] do_one_initcall+0x3d/0x1a0
    [ 25.607778] [] sys_init_module+0xe6/0x270
    [ 25.607786] [] system_call_fastpath+0x16/0x1b
    [ 25.607794] [] 0x7f84d6783f4a

    and thus must not be preempted on -rt.

    In mainline this change documents the low level nature of
    the lock - otherwise there's no functional difference. Lockdep
    and Sparse checking will work as usual.

    Signed-off-by: Mike Galbraith
    [ Fixed the domain allocation which was calling kzalloc from the irq disabled section ]
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Mike Galbraith
     
  • uic->lock is protecting the interrupt controller hardware. This lock
    can not be preempted on -rt.

    In mainline this change documents the low level nature of
    the lock - otherwise there's no functional difference. Lockdep
    and Sparse checking will work as usual.

    Reported-by: Darcy L. Watkins
    Signed-off-by: Thomas Gleixner
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • The cmci_discover_lock can be taken in atomic context (cpu bring
    up sequence) and therefore cannot be preempted on -rt.

    In mainline this change documents the low level nature of
    the lock - otherwise there's no functional difference. Lockdep
    and Sparse checking will work as usual.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • We cannot preempt this lock on -rt as we are in an
    interrupt disabled region and about to go into deep sleep.

    In mainline this change documents the low level nature of
    the lock - otherwise there's no functional difference. Lockdep
    and Sparse checking will work as usual.

    Signed-off-by: Thomas Gleixner
    Cc: Len Brown
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • The oprofilefs_lock can be taken in atomic context (in profiling
    interrupts) and therefore cannot cannot be preempted on -rt -
    annotate it.

    In mainline this change documents the low level nature of
    the lock - otherwise there's no functional difference. Lockdep
    and Sparse checking will work as usual.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • The vga_lock lock can be taken in atomic context and therefore
    cannot be preempted on -rt - annotate it.

    In mainline this change documents the low level nature of
    the lock - otherwise there's no functional difference. Lockdep
    and Sparse checking will work as usual.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • The latency_lock is lock can be taken in the guts of the
    scheduler code and therefore cannot be preempted on -rt -
    annotate it.

    In mainline this change documents the low level nature of
    the lock - otherwise there's no functional difference. Lockdep
    and Sparse checking will work as usual.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • The table_lock lock can be taken in atomic context and therefore
    cannot be preempted on -rt - annotate it.

    In mainline this change documents the low level nature of
    the lock - otherwise there's no functional difference. Lockdep
    and Sparse checking will work as usual.

    Reported-by: Andreas Sundebo
    Signed-off-by: Thomas Gleixner
    Tested-by: Andreas Sundebo

    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • There is no reason to allow the lock protecting rwsems (the
    ownerless variant) to be preemptible on -rt. Convert it to raw.

    In mainline this change documents the low level nature of
    the lock - otherwise there's no functional difference. Lockdep
    and Sparse checking will work as usual.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • There is no reason to have the spin_lock protecting the semaphore
    preemptible on -rt. Annotate it as a raw_spinlock.

    In mainline this change documents the low level nature of
    the lock - otherwise there's no functional difference. Lockdep
    and Sparse checking will work as usual.

    ( On rt this also solves lockdep complaining about the
    rt_mutex.wait_lock being not initialized. )

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • The thread_group_cputimer lock can be taken in atomic context and therefore
    cannot be preempted on -rt - annotate it.

    In mainline this change documents the low level nature of
    the lock - otherwise there's no functional difference. Lockdep
    and Sparse checking will work as usual.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • The logbuf_lock lock can be taken in atomic context and therefore
    cannot be preempted on -rt - annotate it.

    In mainline this change documents the low level nature of
    the lock - otherwise there's no functional difference. Lockdep
    and Sparse checking will work as usual.

    Signed-off-by: Thomas Gleixner
    [ merged and fixed it ]
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • The tracing locks can be taken in atomic context and therefore
    cannot be preempted on -rt - annotate it.

    In mainline this change documents the low level nature of
    the lock - otherwise there's no functional difference. Lockdep
    and Sparse checking will work as usual.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • The prop_local_percpu::lock can be taken in atomic context and therefore
    cannot be preempted on -rt - annotate it.

    In mainline this change documents the low level nature of
    the lock - otherwise there's no functional difference. Lockdep
    and Sparse checking will work as usual.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • The release_list_lock can be taken in atomic context and therefore
    cannot be preempted on -rt - annotate it.

    In mainline this change documents the low level nature of
    the lock - otherwise there's no functional difference. Lockdep
    and Sparse checking will work as usual.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • The percpu_counter::lock can be taken in atomic context and therefore
    cannot be preempted on -rt - annotate it.

    In mainline this change documents the low level nature of
    the lock - otherwise there's no functional difference. Lockdep
    and Sparse checking will work as usual.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • The kprobe locks can be taken in atomic context and therefore
    cannot be preempted on -rt - annotate it.

    In mainline this change documents the low level nature of
    the lock - otherwise there's no functional difference. Lockdep
    and Sparse checking will work as usual.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     
  • Merge reason: We are queueing up locking annotation patches, move to a fresh base

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Linus Torvalds
     
  • * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
    drm: Remove duplicate "return" statement
    drm/nv04/crtc: Bail out if FB is not bound to crtc
    drm/nouveau: fix nv04_sgdma_bind on non-"4kB pages" archs
    drm/nouveau: properly handle allocation failure in nouveau_sgdma_populate
    drm/nouveau: fix oops on pre-semaphore hardware
    drm/nv50/crtc: Bail out if FB is not bound to crtc
    drm/radeon/kms: fix DP detect and EDID fetch for DP bridges

    Linus Torvalds
     
  • * 'fixes' of git://git.linaro.org/people/arnd/arm-soc:
    ARM: CSR: add missing sentinels to of_device_id tables
    ARM: cns3xxx: Fix newly introduced warnings in the PCIe code
    ARM: cns3xxx: Fix compile error caused by hardware.h removed
    ARM: davinci: fix cache flush build error
    ARM: davinci: correct MDSTAT_STATE_MASK
    ARM: davinci: da850 EVM: read mac address from SPI flash
    OMAP: omap_device: fix !CONFIG_SUSPEND case in _noirq handlers
    OMAP2430: hwmod: musb: add missing terminator to omap2430_usbhsotg_addrs[]
    OMAP3: clock: indicate that gpt12_fck and wdt1_fck are in the WKUP clockdomain
    OMAP4: clock: fix compile warning
    OMAP4: clock: re-enable previous clockdomain enable/disable sequence
    OMAP: clockdomain: Wait for powerdomain to be ON when using clockdomain force wakeup
    OMAP: powerdomains: Make all powerdomain target states as ON at init

    Linus Torvalds
     
  • The LTTng 2.0 kernel tracer (stand-alone module package, available at
    http://lttng.org) uses the 0xF6 ioctl range for tracer control and
    transport operations.

    Signed-off-by: Mathieu Desnoyers
    Signed-off-by: Linus Torvalds

    Mathieu Desnoyers
     
  • * 'for-linus' of git://github.com/chrismason/linux:
    Btrfs: add dummy extent if dst offset excceeds file end in
    Btrfs: calc file extent num_bytes correctly in file clone
    btrfs: xattr: fix attribute removal
    Btrfs: fix wrong nbytes information of the inode
    Btrfs: fix the file extent gap when doing direct IO
    Btrfs: fix unclosed transaction handle in btrfs_cont_expand
    Btrfs: fix misuse of trans block rsv
    Btrfs: reset to appropriate block rsv after orphan operations
    Btrfs: skip locking if searching the commit root in csum lookup
    btrfs: fix warning in iput for bad-inode
    Btrfs: fix an oops when deleting snapshots

    Linus Torvalds
     
  • kmemleak is reporting that 32 bytes are being leaked by FUSE:

    unreferenced object 0xe373b270 (size 32):
    comm "fusermount", pid 1207, jiffies 4294707026 (age 2675.187s)
    hex dump (first 32 bytes):
    01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    backtrace:
    [] kmemleak_alloc+0x27/0x50
    [] kmem_cache_alloc+0xc5/0x180
    [] fuse_alloc_forget+0x1e/0x20
    [] fuse_alloc_inode+0xb0/0xd0
    [] alloc_inode+0x1c/0x80
    [] iget5_locked+0x8f/0x1a0
    [] fuse_iget+0x72/0x1a0
    [] fuse_get_root_inode+0x8a/0x90
    [] fuse_fill_super+0x3ef/0x590
    [] mount_nodev+0x3f/0x90
    [] fuse_mount+0x15/0x20
    [] mount_fs+0x1c/0xc0
    [] vfs_kern_mount+0x41/0x90
    [] do_kern_mount+0x39/0xd0
    [] do_mount+0x2e5/0x660
    [] sys_mount+0x66/0xa0

    This leak report is consistent and happens once per boot on
    3.1.0-rc5-dirty.

    This happens if a FORGET request is queued after the fuse device was
    released.

    Reported-by: Sitsofe Wheeler
    Signed-off-by: Miklos Szeredi
    Tested-by: Sitsofe Wheeler
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • Commit 37fb3a30b4 ("fuse: fix flock") added in 3.1-rc4 caused flock() to
    fail with ENOSYS with the kernel ABI version 7.16 or earlier.

    Fix by falling back to testing FUSE_POSIX_LOCKS for ABI versions 7.16
    and earlier.

    Reported-by: Martin Ziegler
    Signed-off-by: Miklos Szeredi
    Tested-by: Martin Ziegler
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • Arnd Bergmann
     

12 Sep, 2011

4 commits


11 Sep, 2011

10 commits

  • You can see there's no file extent with range [0, 4096]. Check this by
    btrfsck:

    # btrfsck /dev/sda7
    root 5 inode 258 errors 100
    ...

    Signed-off-by: Li Zefan
    Signed-off-by: Chris Mason

    Li Zefan
     
  • num_bytes should be 4096 not 12288.

    Signed-off-by: Li Zefan
    Signed-off-by: Chris Mason

    Li Zefan
     
  • An attribute is not removed by 'setfattr -x attr file' and remains
    visible in attr list. This makes xfstests/062 pass again.

    Signed-off-by: David Sterba
    Signed-off-by: Chris Mason

    David Sterba
     
  • If we write some data into the data hole of the file(no preallocation for this
    hole), Btrfs will allocate some disk space, and update nbytes of the inode, but
    the other element--disk_i_size needn't be updated. At this condition, we must
    update inode metadata though disk_i_size is not changed(btrfs_ordered_update_i_size()
    return 1).

    # mkfs.btrfs /dev/sdb1
    # mount /dev/sdb1 /mnt
    # touch /mnt/a
    # truncate -s 856002 /mnt/a
    # dd if=/dev/zero of=/mnt/a bs=4K count=1 conv=nocreat,notrunc
    # umount /mnt
    # btrfsck /dev/sdb1
    root 5 inode 257 errors 400
    found 32768 bytes used err is 1

    Signed-off-by: Miao Xie
    Signed-off-by: Chris Mason

    Miao Xie
     
  • When we write some data to the place that is beyond the end of the file
    in direct I/O mode, a data hole will be created. And Btrfs should insert
    a file extent item that point to this hole into the fs tree. But unfortunately
    Btrfs forgets doing it.

    The following is a simple way to reproduce it:
    # mkfs.btrfs /dev/sdc2
    # mount /dev/sdc2 /test4
    # touch /test4/a
    # dd if=/dev/zero of=/test4/a seek=8 count=1 bs=4K oflag=direct conv=nocreat,notrunc
    # umount /test4
    # btrfsck /dev/sdc2
    root 5 inode 257 errors 100

    Reported-by: Tsutomu Itoh
    Signed-off-by: Miao Xie
    Tested-by: Tsutomu Itoh
    Signed-off-by: Chris Mason

    Miao Xie
     
  • The function - btrfs_cont_expand() forgot to close the transaction handle before
    it jump out the while loop. Fix it.

    Signed-off-by: Miao Xie
    Signed-off-by: Chris Mason

    Miao Xie
     
  • At the beginning of create_pending_snapshot, trans->block_rsv is set
    to pending->block_rsv and is used for snapshot things, however, when
    it is done, we do not recover it as will.

    Signed-off-by: Liu Bo
    Signed-off-by: Chris Mason

    Liu Bo
     
  • While truncating free space cache, we forget to change trans->block_rsv
    back to the original one, but leave it with the orphan_block_rsv, and
    then with option inode_cache enable, it leads to countless warnings of
    btrfs_alloc_free_block and btrfs_orphan_commit_root:

    WARNING: at fs/btrfs/extent-tree.c:5711 btrfs_alloc_free_block+0x180/0x350 [btrfs]()
    ...
    WARNING: at fs/btrfs/inode.c:2193 btrfs_orphan_commit_root+0xb0/0xc0 [btrfs]()

    Signed-off-by: Liu Bo
    Signed-off-by: Chris Mason

    Liu Bo
     
  • It's not enough to just search the commit root, since we could be cow'ing the
    very block we need to search through, which would mean that its locked and we'll
    still deadlock. So use path->skip_locking as well. Thanks,

    Signed-off-by: Josef Bacik
    Signed-off-by: Chris Mason

    Josef Bacik
     
  • iput() shouldn't be called for inodes in I_NEW state.
    We need to mark inode as constructed first.

    WARNING: at fs/inode.c:1309 iput+0x20b/0x210()
    Call Trace:
    [] warn_slowpath_common+0x7a/0xb0
    [] warn_slowpath_null+0x15/0x20
    [] iput+0x20b/0x210
    [] btrfs_iget+0x1eb/0x4a0
    [] btrfs_run_defrag_inodes+0x136/0x210
    [] cleaner_kthread+0x17f/0x1a0
    [] ? sub_preempt_count+0x9d/0xd0
    [] ? transaction_kthread+0x280/0x280
    [] kthread+0x96/0xa0
    [] kernel_thread_helper+0x4/0x10
    [] ? kthread_worker_fn+0x190/0x190
    [] ? gs_change+0xb/0xb

    Signed-off-by: Sergei Trofimovich
    CC: Konstantin Khlebnikov
    Tested-by: David Sterba
    CC: Josef Bacik
    CC: Chris Mason
    Signed-off-by: Chris Mason

    Sergei Trofimovich