23 Nov, 2011

3 commits

  • * 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
    NFS: Revert pnfs ugliness from the generic NFS read code path
    SUNRPC: destroy freshly allocated transport in case of sockaddr init error
    NFS: Fix a regression in the referral code
    nfs: move nfs_file_operations declaration to bottom of file.c (try #2)
    nfs: when attempting to open a directory, fall back on normal lookup (try #5)

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
    Btrfs: remove free-space-cache.c WARN during log replay
    Btrfs: sectorsize align offsets in fiemap
    Btrfs: clear pages dirty for io and set them extent mapped
    Btrfs: wait on caching if we're loading the free space cache
    Btrfs: prefix resize related printks with btrfs:
    btrfs: fix stat blocks accounting
    Btrfs: avoid unnecessary bitmap search for cluster setup
    Btrfs: fix to search one more bitmap for cluster setup
    btrfs: mirror_num should be int, not u64
    btrfs: Fix up 32/64-bit compatibility for new ioctls
    Btrfs: fix barrier flushes
    Btrfs: fix tree corruption after multi-thread snapshots and inode_cache flush

    Linus Torvalds
     
  • * 'writeback-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
    writeback: remove vm_dirties and task->dirties
    writeback: hard throttle 1000+ dd on a slow USB stick
    mm: Make task in balance_dirty_pages() killable

    Linus Torvalds
     

22 Nov, 2011

11 commits


21 Nov, 2011

5 commits

  • To prevent an NFS server from being used to create a directory loop in an NFS
    superblock on the client, the following patch was committed:

    commit 1836750115f20b774e55c032a3893e8c5bdf41ed
    Author: Al Viro
    Date: Tue Jul 12 21:42:24 2011 -0400
    Subject: fix loop checks in d_materialise_unique()

    This causes ELOOP to be reported to anyone trying to access the dentry that
    would otherwise cause the kernel to complete the loop.

    However, no indication is given to the caller as to why an operation that ought
    to work doesn't. The fault is with the kernel, which doesn't want to try and
    solve the problem as it gets horrendously messy if there's another mountpoint
    somewhere in the trees being spliced that can't be moved[*].

    [*] The real problem is that we don't handle the excision of a subtree that
    gets moved _out_ of what we can see. This can happen on the server where a
    directory is merely moved between two other dirs on the same filesystem, but
    where destination dir is not accessible by the client.

    So, given the choice to return ELOOP rather than trying to reconfigure the
    dentry tree, we should give the caller some indication of why they aren't being
    allowed to make what should be a legitimate request and log a message.

    Signed-off-by: David Howells
    Acked-by: Sachin Prabhu
    Signed-off-by: Al Viro

    David Howells
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (86 commits)
    ipv4: fix redirect handling
    ping: dont increment ICMP_MIB_INERRORS
    sky2: fix hang in napi_disable
    sky2: enforce minimum ring size
    bonding: Don't allow mode change via sysfs with slaves present
    f_phonet: fix page offset of first received fragment
    stmmac: fix pm functions avoiding sleep on spinlock
    stmmac: remove spin_lock in stmmac_ioctl.
    stmmac: parameters auto-tuning through HW cap reg
    stmmac: fix advertising 1000Base capabilties for non GMII iface
    stmmac: use mdelay on timeout of sw reset
    sky2: version 1.30
    sky2: used fixed RSS key
    sky2: reduce default Tx ring size
    sky2: rename up/down functions
    sky2: pci posting issues
    sky2: fix hang on shutdown (and other irq issues)
    r6040: fix check against MCRO_HASHEN bit in r6040_multicast_list
    MAINTAINERS: change email address for shemminger
    pch_gbe: Move #include of module.h
    ...

    Linus Torvalds
     
  • * 'kvm-updates/3.2' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    KVM guest: prevent tracing recursion with kvmclock
    Revert "KVM: PPC: Add support for explicit HIOR setting"
    KVM: VMX: Check for automatic switch msr table overflow
    KVM: VMX: Add support for guest/host-only profiling
    KVM: VMX: add support for switching of PERF_GLOBAL_CTRL
    KVM: s390: announce SYNC_MMU
    KVM: s390: Fix tprot locking
    KVM: s390: handle SIGP sense running intercepts
    KVM: s390: Fix RUNNING flag misinterpretation

    Linus Torvalds
     
  • * 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm:
    ARM: wire up process_vm_writev and process_vm_readv syscalls
    ARM: 7160/1: setup: avoid overflowing {elf,arch}_name from proc_info_list
    ARM: 7158/1: add new MFP implement for NUC900
    ARM: 7157/1: fix a building WARNING for nuc900
    ARM: 7156/1: l2x0: fix compile error on !CONFIG_USE_OF
    ARM: 7155/1: arch.h: Declare 'pt_regs' locally
    ARM: 7154/1: mach-bcmring: fix build error in dma.c
    ARM: 7153/1: mach-bcmring: fix build error in core.c
    ARM: 7152/1: distclean: Remove generated .dtb files
    ARM: 7150/1: Allow kernel unaligned accesses on ARMv6+ processors
    ARM: 7149/1: spi/pl022: Enable clock in probe
    Revert "ARM: 7098/1: kdump: copy kernel relocation code at the kexec prepare stage"

    Linus Torvalds
     
  • * 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    PM / Suspend: Fix bug in suspend statistics update
    PM / Hibernate: Fix the early termination of test modes
    PM / shmobile: Fix build of sh7372_pm_init() for CONFIG_PM unset
    PM Sleep: Do not extend wakeup paths to devices with ignore_children set
    PM / driver core: disable device's runtime PM during shutdown
    PM / devfreq: correct Kconfig dependency
    PM / devfreq: fix use after free in devfreq_remove_device
    PM / shmobile: Avoid restoring the INTCS state during initialization
    PM / devfreq: Remove compiler error after irq.h update
    PM / QoS: Properly use the WARN() macro in dev_pm_qos_add_request()
    PM / Clocks: Only disable enabled clocks in pm_clk_suspend()
    ARM: mach-shmobile: sh7372 A3SP no_suspend_console fix
    PM / shmobile: Don't skip debugging output in pd_power_up()

    Linus Torvalds
     

20 Nov, 2011

14 commits

  • We've been hitting BUG()'s in btrfs_cont_expand and btrfs_fallocate and anywhere
    else that calls btrfs_get_extent while running xfstests 13 in a loop. This is
    because fiemap is calling btrfs_get_extent with non-sectorsize aligned offsets,
    which will end up adding mappings that are not sectorsize aligned, which will
    cause problems in some cases for subsequent calls to btrfs_get_extent for
    similar areas that are sectorsize aligned. With this patch I ran xfstests 13 in
    a loop for a couple of hours and didn't hit the problem that I could previously
    hit in at most 20 minutes. Thanks,

    Signed-off-by: Josef Bacik

    Josef Bacik
     
  • When doing the io_ctl helpers to clean up the free space cache stuff I stopped
    using our normal prepare_pages stuff, which means I of course forgot to do
    things like set the pages extent mapped, which will cause us all sorts of
    wonderful propblems. Thanks,

    Signed-off-by: Josef Bacik

    Josef Bacik
     
  • We've been hitting panics when running xfstest 13 in a loop for long periods of
    time. And actually this problem has always existed so we've been hitting these
    things randomly for a while. Basically what happens is we get a thread coming
    into the allocator and reading the space cache off of disk and adding the
    entries to the free space cache as we go. Then we get another thread that comes
    in and tries to allocate from that block group. Since block_group->cached !=
    BTRFS_CACHE_NO it goes ahead and tries to do the allocation. We do this because
    if we're doing the old slow way of caching we don't want to hold people up and
    wait for everything to finish. The problem with this is we could end up
    discarding the space cache at some arbitrary point in the future, which means we
    could very well end up allocating space that is either bad, or when the real
    caching happens it could end up thinking the space isn't in use when it really
    is and cause all sorts of other problems.

    The solution is to add a new flag to indicate we are loading the free space
    cache from disk, and always try to cache the block group if cache->cached !=
    BTRFS_CACHE_FINISHED. That way if we are loading the space cache anybody else
    who tries to allocate from the block group will have to wait until it's finished
    to make sure it completes successfully. Thanks,

    Signed-off-by: Josef Bacik

    Josef Bacik
     
  • For the user it is confusing to find something like:
    [10197.627710] new size for /dev/mapper/vg0-usr_share is 3221225472
    in kernel log, because it doesn't point directly to btrfs.

    This patch prefixes those messages with "btrfs:" like other btrfs
    related printks.

    Signed-off-by: Arnd Hannemann
    Signed-off-by: Chris Mason

    Arnd Hannemann
     
  • Round inode bytes and delalloc bytes up to real blocksize before
    converting to sector size. Otherwise eg. files smaller than 512
    are reported with zero blocks due to incorrect rounding.

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

    David Sterba
     
  • setup_cluster_no_bitmap() searches all the extents and bitmaps starting
    from offset. Therefore if it returns -ENOSPC, all the bitmaps starting
    from offset are in the bitmaps list, so it's sufficient to search from
    this list in setup_cluser_bitmap().

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

    Li Zefan
     
  • Suppose there are two bitmaps [0, 256], [256, 512] and one extent
    [100, 120] in the free space cache, and we want to setup a cluster
    with offset=100, bytes=50.

    In this case, there will be only one bitmap [256, 512] in the temporary
    bitmaps list, and then setup_cluster_bitmap() won't search bitmap [0, 256].

    The cause is, the list is constructed in setup_cluster_no_bitmap(),
    and only bitmaps with bitmap_entry->offset >= offset will be added
    into the list, and the very bitmap that convers offset has
    bitmap_entry->offset
    Signed-off-by: Chris Mason

    Li Zefan
     
  • My previous patch introduced some u64 for failed_mirror variables, this one
    makes it consistent again.

    Signed-off-by: Jan Schmidt
    Signed-off-by: Chris Mason

    Jan Schmidt
     
  • This patch casts to unsigned long before casting to a pointer and fixes
    the following warnings:
    fs/btrfs/extent_io.c:2289:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    fs/btrfs/ioctl.c:2933:37: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    fs/btrfs/ioctl.c:2937:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    fs/btrfs/ioctl.c:3020:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    fs/btrfs/scrub.c:275:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    fs/btrfs/backref.c:686:27: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Chris Mason

    Jeff Mahoney
     
  • When btrfs is writing the super blocks, it send barrier flushes to make
    sure writeback caching drives get all the metadata on disk in the
    right order.

    But, we have two bugs in the way these are sent down. When doing
    full commits (not via the tree log), we are sending the barrier down
    before the last super when it should be going down before the first.

    In multi-device setups, we should be waiting for the barriers to
    complete on all devices before writing any of the supers.

    Both of these bugs can cause corruptions on power failures. We fix it
    with some new code to send down empty barriers to all devices before
    writing the first super.

    Alexandre Oliva found the multi-device bug. Arne Jansen did the async
    barrier loop.

    Signed-off-by: Chris Mason
    Reported-by: Alexandre Oliva

    Chris Mason
     
  • Prevent tracing of preempt_disable() in get_cpu_var() in
    kvm_clock_read(). When CONFIG_DEBUG_PREEMPT is enabled,
    preempt_disable/enable() are traced and this causes the function_graph
    tracer to go into an infinite recursion. By open coding the
    preempt_disable() around the get_cpu_var(), we can use the notrace
    version which prevents preempt_disable/enable() from being traced and
    prevents the recursion.

    Based on a similar patch for Xen from Jeremy Fitzhardinge.

    Tested-by: Gleb Natapov
    Acked-by: Steven Rostedt
    Signed-off-by: Avi Kivity

    Avi Kivity
     
  • * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
    hwmon: (exynos4_tmu) Fix Kconfig dependency

    [ Merging code in-flight, just because I can. What timezone should I
    use? - Linus ]

    Linus Torvalds
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • Newer versions of MINIX can create filesystems that allocate an extra
    bitmap block. Mounting of this succeeds, but doing a statfs call will
    result in an oops in count_free because of a negative number being used
    for the bh index.

    Avoid this by verifying the number of allocated blocks at mount time,
    erroring out if there are not enough and make statfs ignore the extras
    if there are too many.

    This fixes https://bugzilla.kernel.org/show_bug.cgi?id=18792

    Signed-off-by: Josh Boyer
    Signed-off-by: Al Viro

    Josh Boyer
     

19 Nov, 2011

7 commits

  • After commit 2a77c46de1e3dace73745015635ebbc648eca69c
    (PM / Suspend: Add statistics debugfs file for suspend to RAM)
    a missing pair of braces inside the state_store() function causes even
    invalid arguments to suspend to be wrongly treated as failed suspend
    attempts. Fix this.

    [rjw: Put the hash/subject of the buggy commit into the changelog.]

    Signed-off-by: Srivatsa S. Bhat
    Signed-off-by: Rafael J. Wysocki

    Srivatsa S. Bhat
     
  • No longer at Citrix, still interested in Xen.

    Signed-off-by: Jeremy Fitzhardinge
    Cc: Jeremy Fitzhardinge
    Signed-off-by: Linus Torvalds

    Jeremy Fitzhardinge
     
  • Dummy, non-zero definitions for HPAGE_MASK and HPAGE_SIZE were added in
    51c6f666fceb ("mm: ZAP_BLOCK causes redundant work") to avoid a divide
    by zero in generic kernel code.

    That code has since been removed, but probably should never have been
    added in the first place: we don't want HPAGE_SIZE to act like PAGE_SIZE
    for code that is working with hugepages, for example, when the
    dependency on CONFIG_HUGETLB_PAGE has not been fulfilled.

    Because hugepage size can differ from architecture to architecture, each
    is required to have their own definitions for both HPAGE_MASK and
    HPAGE_SIZE. This is always done in arch/*/include/asm/page.h.

    So, just remove the dummy and dangerous definitions since they are no
    longer needed and reveals the correct dependencies. Tested on
    architectures using the definitions with allyesconfig: x86 (even with
    thp), hppa, mips, powerpc, s390, sh3, sh4, sparc, and sparc64, and with
    defconfig on ia64.

    Signed-off-by: David Rientjes
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    new helper: mount_subtree()
    switch create_mnt_ns() to saner calling conventions, fix double mntput() in nfs
    btrfs: fix double mntput() in mount_subvol()

    Linus Torvalds
     
  • * 'for-linus' of git://oss.sgi.com/xfs/xfs:
    MAINTAINERS: update XFS maintainer entry
    xfs: use doalloc flag in xfs_qm_dqattach_one()

    Linus Torvalds
     
  • * 'for-3.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
    cgroup: Replace Paul Menage with Tejun Heo as cgroups maintainer

    Linus Torvalds
     
  • * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    random: Fix handing of arch_get_random_long in get_random_bytes()
    x86: Call stop_machine_text_poke() on all CPUs
    x86, ioapic: Only print ioapic debug information for IRQs belonging to an ioapic chip
    x86/mrst: Avoid reporting wrong nmi status
    x86/mrst: Add support for Penwell clock calibration
    x86/apic: Allow use of lapic timer early calibration result
    x86/apic: Do not clear nr_irqs_gsi if no legacy irqs
    x86/platform: Add a wallclock_init func to x86_platforms ops
    x86/mce: Make mce_chrdev_ops 'static const'

    Linus Torvalds