04 Apr, 2009

10 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/kyle/rtc-parisc:
    powerpc/ps3: Add rtc-ps3
    powerpc: Hook up rtc-generic, and kill rtc-ppc
    m68k: Hook up rtc-generic
    parisc: rtc: Rename rtc-parisc to rtc-generic
    parisc: rtc: Add missing module alias
    parisc: rtc: platform_driver_probe() fixups
    parisc: rtc: get_rtc_time() returns unsigned int

    Linus Torvalds
     
  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6:
    udf: Don't write integrity descriptor too often
    udf: Try anchor in block 256 first
    udf: Some type fixes and cleanups
    udf: use hardware sector size
    udf: fix novrs mount option
    udf: Fix oops when invalid character in filename occurs
    udf: return f_fsid for statfs(2)
    udf: Add checks to not underflow sector_t
    udf: fix default mode and dmode options handling
    udf: fix sparse warnings:
    udf: unsigned last[i] cannot be less than 0
    udf: implement mode and dmode mounting options
    udf: reduce stack usage of udf_get_filename
    udf: reduce stack usage of udf_load_pvoldesc
    Fix the udf code not to pass structs on stack where possible.
    Remove struct typedefs from fs/udf/ecma_167.h et al.

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/rcu-doc-2.6:
    Doc: Fix spelling in RCU/rculist_nulls.txt.
    Doc: Fix wrong API example usage of call_rcu().
    Doc: Fix missing whitespaces in RCU documentation.

    Linus Torvalds
     
  • Commit 7ca43e7564679604d86e9ed834e7bbcffd8a4a3f ("mm: use debug_kmap_atomic")
    introduced some debug_kmap_atomic() in wrong places.

    Signed-off-by: Akinobu Mita
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • Commit f4112de6b679d84bd9b9681c7504be7bdfb7c7d5 ("mm: introduce
    debug_kmap_atomic") broke PPC builds with CONFIG_HIGHMEM=y:

    CC init/main.o
    In file included from include/linux/highmem.h:25,
    from include/linux/pagemap.h:11,
    from include/linux/mempolicy.h:63,
    from init/main.c:53:
    arch/powerpc/include/asm/highmem.h: In function 'kmap_atomic_prot':
    arch/powerpc/include/asm/highmem.h:98: error: implicit declaration of function 'debug_kmap_atomic'
    In file included from include/linux/pagemap.h:11,
    from include/linux/mempolicy.h:63,
    from init/main.c:53:
    include/linux/highmem.h: At top level:
    include/linux/highmem.h:196: warning: conflicting types for 'debug_kmap_atomic'
    include/linux/highmem.h:196: error: static declaration of 'debug_kmap_atomic' follows non-static declaration
    include/asm/highmem.h:98: error: previous implicit declaration of 'debug_kmap_atomic' was here
    make[1]: *** [init/main.o] Error 1
    make: *** [init] Error 2

    Signed-off-by: Kumar Gala
    Acked-by: Akinobu Mita
    Signed-off-by: Linus Torvalds

    Kumar Gala
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    crypto: ixp4xx - Fix handling of chained sg buffers
    crypto: shash - Fix unaligned calculation with short length
    hwrng: timeriomem - Use phys address rather than virt

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: (41 commits)
    m68knommu: improve compile arch switch settings
    m68knommu: fix 5407 ColdFire UART vector setup
    m68knommu: fix 5307 ColdFire UART vector setup
    m68knommu: fix 5249 ColdFire UART vector setup
    m68knommu: fix 5249 ColdFire UART setup
    m68knommu: fix end of uart table marker
    m68knommu: switch to using generic_handle_irq()
    m68k: merge the mmu and non-mmu versions of tlbflush.h
    m68knommu: introduce basic clk infrastructure
    m68k: merge the mmu and non-mmu versions of module.h
    m68knommu: add missing interrupt line definition for UART 2
    m68k: merge the mmu and non-mmu versions of mmu_context.h
    m68k: merge the mmu and non-mmu versions of current.h
    m68k: merge the mmu and non-mmu versions of div64.h
    m68k: merge the mmu and non-mmu versions of bugs.h
    m68k: merge the mmu and non-mmu versions of bug.h
    m68k: use the mmu version of cache.h for m68knommu as well
    m68k: use the mmu version of bootinfo.h for m68knommu as well
    m68k: merge the mmu and non-mmu versions of fb.h
    m68k: merge the mmu and non-mmu versions of segment.h
    ...

    Linus Torvalds
     
  • * 'for-linus' of git://neil.brown.name/md: (53 commits)
    md/raid5 revise rules for when to update metadata during reshape
    md/raid5: minor code cleanups in make_request.
    md: remove CONFIG_MD_RAID_RESHAPE config option.
    md/raid5: be more careful about write ordering when reshaping.
    md: don't display meaningless values in sysfs files resync_start and sync_speed
    md/raid5: allow layout and chunksize to be changed on active array.
    md/raid5: reshape using largest of old and new chunk size
    md/raid5: prepare for allowing reshape to change layout
    md/raid5: prepare for allowing reshape to change chunksize.
    md/raid5: clearly differentiate 'before' and 'after' stripes during reshape.
    Documentation/md.txt update
    md: allow number of drives in raid5 to be reduced
    md/raid5: change reshape-progress measurement to cope with reshaping backwards.
    md: add explicit method to signal the end of a reshape.
    md/raid5: enhance raid5_size to work correctly with negative delta_disks
    md/raid5: drop qd_idx from r6_state
    md/raid6: move raid6 data processing to raid6_pq.ko
    md: raid5 run(): Fix max_degraded for raid level 4.
    md: 'array_size' sysfs attribute
    md: centralize ->array_sectors modifications
    ...

    Linus Torvalds
     
  • * master.kernel.org:/home/rmk/linux-2.6-arm:
    [ARM] fix build-breaking 7a192ec commit
    ARM: Add SMSC911X support to Overo platform (V2)
    arm: update omap_ldp defconfig to use smsc911x
    arm: update realview defconfigs to use smsc911x
    arm: update pcm037 defconfig to use smsc911x
    arm: convert omap ldp platform to use smsc911x
    arm: convert realview platform to use smsc911x
    arm: convert pcm037 platform to use smsc911x
    [ARM] 5444/1: ARM: Realview: Fix event-device multiplicators in localtimer.c
    [ARM] 5442/1: pxa/cm-x255: fix reverse RDY gpios in PCMCIA driver
    [ARM] 5441/1: Use pr_err on error paths in at91 pm
    [ARM] 5440/1: Fix VFP state corruption due to preemption during VFP exceptions
    [ARM] 5439/1: Do not clear bit 10 of DFSR during abort handling on ARMv6
    [ARM] 5437/1: Add documentation for "nohlt" kernel parameter
    [ARM] 5436/1: ARM: OMAP: Fix compile for rx51
    [ARM] arch_reset() now takes a second parameter
    [ARM] Kirkwood: small L2 code cleanup
    [ARM] Kirkwood: invalidate L2 cache before enabling it

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/bart/linux-hdreg-h-cleanup:
    remove include from
    include/linux/hdreg.h: remove unused defines
    isd200: use ATA_* defines instead of *_STAT and *_ERR ones
    include/linux/hdreg.h: cover WIN_* and friends with #ifndef/#endif __KERNEL__
    aoe: WIN_* -> ATA_CMD_*
    isd200: WIN_* -> ATA_CMD_*
    include/linux/hdreg.h: cover struct hd_driveid with #ifndef/#endif __KERNEL__
    xsysace: make it 'struct hd_driveid'-free
    ubd_kern: make it 'struct hd_driveid'-free
    isd200: make it 'struct hd_driveid'-free

    Linus Torvalds
     

03 Apr, 2009

30 commits

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
    Remove two unneeded exports and make two symbols static in fs/mpage.c
    Cleanup after commit 585d3bc06f4ca57f975a5a1f698f65a45ea66225
    Trim includes of fdtable.h
    Don't crap into descriptor table in binfmt_som
    Trim includes in binfmt_elf
    Don't mess with descriptor table in load_elf_binary()
    Get rid of indirect include of fs_struct.h
    New helper - current_umask()
    check_unsafe_exec() doesn't care about signal handlers sharing
    New locking/refcounting for fs_struct
    Take fs_struct handling to new file (fs/fs_struct.c)
    Get rid of bumping fs_struct refcount in pivot_root(2)
    Kill unsharing fs_struct in __set_personality()

    Linus Torvalds
     
  • * 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (21 commits)
    drm/radeon: load the right microcode on rs780
    drm: remove unused "can_grow" parameter from drm_crtc_helper_initial_config
    drm: fix EDID backward compat check
    drm: sync the mode validation for INTERLACE/DBLSCAN
    drm: fix typo in edid vendor parsing.
    DRM: drm_crtc_helper.h doesn't actually need i2c.h
    drm: fix missing inline function on 32-bit powerpc.
    drm: Use pgprot_writecombine in GEM GTT mapping to get the right bits for !PAT.
    drm/i915: Add a spinlock to protect the active_list
    drm/i915: Fix SDVO TV support
    drm/i915: Fix SDVO CREATE_PREFERRED_INPUT_TIMING command
    drm/i915: Fix error in SDVO DTD and modeline convert
    drm/i915: Fix SDVO command debug function
    drm/i915: fix TV mode setting in property change
    drm/i915: only set TV mode when any property changed
    drm/i915: clean up udelay usage
    drm/i915: add VGA hotplug support for 945+
    drm/i915: correctly set IGD device's gtt size for KMS.
    drm/i915: avoid hanging on to a stale pointer to raw_edid.
    drm/i915: check for -EINVAL from vm_insert_pfn
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (54 commits)
    glge: remove unused #include
    dnet: remove unused #include
    tcp: miscounts due to tcp_fragment pcount reset
    tcp: add helper for counter tweaking due mid-wq change
    hso: fix for the 'invalid frame length' messages
    hso: fix for crash when unplugging the device
    fsl_pq_mdio: Fix compile failure
    fsl_pq_mdio: Revive UCC MDIO support
    ucc_geth: Pass proper device to DMA routines, otherwise oops happens
    i.MX31: Fixing cs89x0 network building to i.MX31ADS
    tc35815: Fix build error if NAPI enabled
    hso: add Vendor/Product ID's for new devices
    ucc_geth: Remove unused header
    gianfar: Remove unused header
    kaweth: Fix locking to be SMP-safe
    net: allow multiple dev per napi with GRO
    r8169: reset IntrStatus after chip reset
    ixgbe: Fix potential memory leak/driver panic issue while setting up Tx & Rx ring parameters
    ixgbe: fix ethtool -A|a behavior
    ixgbe: Patch to fix driver panic while freeing up tx & rx resources
    ...

    Linus Torvalds
     
  • Fix slab corruption caused by alloc_cpumask_var_node() overwriting the
    tail end of an off-stack cpumask.

    The function zeros out cpumask bits beyond the last possible cpu. The
    starting point for zeroing should be the beginning of the mask offset by a
    byte count derived from the number of possible cpus. The offset was
    calculated in bits instead of bytes. This resulted in overwriting the end
    of the cpumask.

    Signed-off-by: Jack Steiner
    Acked-by: Mike Travis
    Acked-by: Ingo Molnar
    Cc: Rusty Russell
    Cc: Stephen Rothwell
    Cc: [2.6.29.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jack Steiner
     
  • Implement __raw_read_lock_flags and __raw_write_lock_flags for the ia64
    architecture.

    [kosaki.motohiro@jp.fujitsu.com: typo fix]
    Signed-off-by: Petr Tesarik
    Signed-off-by: Robin Holt
    Cc:
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Acked-by: Tony Luck
    Signed-off-by: KOSAKI Motohiro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robin Holt
     
  • Pass the original flags to rwlock arch-code, so that it can re-enable
    interrupts if implemented for that architecture.

    Initially, make __raw_read_lock_flags and __raw_write_lock_flags stubs
    which just do the same thing as non-flags variants.

    Signed-off-by: Petr Tesarik
    Signed-off-by: Robin Holt
    Acked-by: Peter Zijlstra
    Cc:
    Acked-by: Ingo Molnar
    Cc: "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robin Holt
     
  • SGI has observed that on large systems, interrupts are not serviced for a
    long period of time when waiting for a rwlock. The following patch series
    re-enables irqs while waiting for the lock, resembling the code which is
    already there for spinlocks.

    I only made the ia64 version, because the patch adds some overhead to the
    fast path. I assume there is currently no demand to have this for other
    architectures, because the systems are not so large. Of course, the
    possibility to implement raw_{read|write}_lock_flags for any architecture
    is still there.

    This patch:

    The new macro LOCK_CONTENDED_FLAGS expands to the correct implementation
    depending on the config options, so that IRQ's are re-enabled when
    possible, but they remain disabled if CONFIG_LOCKDEP is set.

    Signed-off-by: Petr Tesarik
    Signed-off-by: Robin Holt
    Cc:
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robin Holt
     
  • Make ufs return f_fsid info for statfs(2).

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

    Coly Li
     
  • Make sysv file system return f_fsid info for statfs(2).

    Signed-off-by: Coly Li
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Coly Li
     
  • Make squashfs return f_fsid info for statfs(2).

    Signed-off-by: Coly Li
    Cc: Phillip Lougher
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Coly Li
     
  • Make reiserfs3 return f_fsid info for statfs(2). By Andreas' suggestion,
    this patch populates a persistent f_fsid between boots/mounts with help of
    on-disk uuid record.

    Randy Dunlap reported a compiling error from v2 patch like:
    fs/built-in.o: In function `reiserfs_statfs':
    super.c:(.text+0x7332b): undefined reference to `crc32_le'
    super.c:(.text+0x7333f): undefined reference to `crc32_le'
    Also he provided helpful solution to fix this error. The modification of v3
    patch is based on Randy's suggestion, add 'select CRC32' in fs/reiserfs/Kconfig.

    Signed-off-by: Coly Li
    Cc: Randy Dunlap
    Cc: Jeff Mahoney
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Coly Li
     
  • Make qnx4 file system return f_fsid info for statfs(2).

    Signed-off-by: Coly Li
    Acked-by: Anders Larsen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Coly Li
     
  • Make omfs return f_fsid info for statfs(2).

    Signed-off-by: Coly Li
    Acked-by: Bob Copeland
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Coly Li
     
  • Make minix file system return f_fsid info for statfs(2).

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

    Coly Li
     
  • Make isofs return f_fsid info for statfs(2).

    Signed-off-by: Coly Li
    Cc: Jan Kara
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Coly Li
     
  • Make hpfs return f_fsid info for statfs(2).

    Signed-off-by: Coly Li
    Cc: Mikulas Patocka
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Coly Li
     
  • Make hfsplus return f_fsid info for statfs(2).

    Signed-off-by: Coly Li
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Coly Li
     
  • Make hfs return f_fsid info for statfs(2).

    Signed-off-by: Coly Li
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Coly Li
     
  • Make fat return f_fsid info for statfs(2).

    Signed-off-by: Coly Li
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Coly Li
     
  • Make efs return f_fsid info for statfs(2), and do a little variable
    renaming in efs_statfs().

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

    Coly Li
     
  • Make cramfs return f_fsid info for statfs(2).

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

    Coly Li
     
  • Make befs return f_fsid info for statfs(2).

    Signed-off-by: Coly Li
    Cc: Sergey S. Kostyliov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Coly Li
     
  • Make affs return f_fsid info for statfs(2).

    Signed-off-by: Coly Li
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Coly Li
     
  • Currently many file systems in Linux kernel do not return f_fsid in statfs
    info, the value is set as 0 in vfs layer. Anyway, in some conditions,
    f_fsid from statfs(2) is useful, especially being used as (f_fsid, ino)
    pair to uniquely identify a file.

    Basic idea of the patches is generating a unique fs ID by
    huge_encode_dev(sb->s_bdev->bd_dev) during file system mounting life time
    (no endian consistent issue). sb is a point of struct super_block of
    current mounted file system being accessed by statfs(2).

    This patch:

    Make adfs return f_fsid info for statfs(2), and do a little variable
    renaming in adfs_statfs().

    Signed-off-by: Coly Li
    Cc: Roman Zippel
    Cc: "Sergey S. Kostyliov"
    Cc: OGAWA Hirofumi
    Cc: Mikulas Patocka
    Cc: Dave Kleikamp
    Cc: Bob Copeland
    Cc: Anders Larsen
    Cc: Phillip Lougher
    Cc: Christoph Hellwig
    Cc: Evgeniy Dushistov
    Cc: Jan Kara
    Cc: Andreas Dilger
    Cc: Jamie Lokier
    Cc: Theodore Ts'o
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Coly Li
     
  • Signed-off-by: Gerd Hoffmann
    Cc: Arnd Bergmann
    Cc: Al Viro
    Cc:
    Cc:
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gerd Hoffmann
     
  • Signed-off-by: Ralf Baechle
    Signed-off-by: Gerd Hoffmann
    Cc: Arnd Bergmann
    Cc: Al Viro
    Cc:
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ralf Baechle
     
  • This patch adds preadv and pwritev system calls. These syscalls are a
    pretty straightforward combination of pread and readv (same for write).
    They are quite useful for doing vectored I/O in threaded applications.
    Using lseek+readv instead opens race windows you'll have to plug with
    locking.

    Other systems have such system calls too, for example NetBSD, check
    here: http://www.daemon-systems.org/man/preadv.2.html

    The application-visible interface provided by glibc should look like
    this to be compatible to the existing implementations in the *BSD family:

    ssize_t preadv(int d, const struct iovec *iov, int iovcnt, off_t offset);
    ssize_t pwritev(int d, const struct iovec *iov, int iovcnt, off_t offset);

    This prototype has one problem though: On 32bit archs is the (64bit)
    offset argument unaligned, which the syscall ABI of several archs doesn't
    allow to do. At least s390 needs a wrapper in glibc to handle this. As
    we'll need a wrappers in glibc anyway I've decided to push problem to
    glibc entriely and use a syscall prototype which works without
    arch-specific wrappers inside the kernel: The offset argument is
    explicitly splitted into two 32bit values.

    The patch sports the actual system call implementation and the windup in
    the x86 system call tables. Other archs follow as separate patches.

    Signed-off-by: Gerd Hoffmann
    Cc: Arnd Bergmann
    Cc: Al Viro
    Cc:
    Cc:
    Cc: Ralf Baechle
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gerd Hoffmann
     
  • Factor out some code from compat_sys_writev() which can be shared with the
    upcoming compat_sys_pwritev().

    Signed-off-by: Gerd Hoffmann
    Cc: Arnd Bergmann
    Cc: Al Viro
    Cc:
    Cc:
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gerd Hoffmann
     
  • This patch series:

    Implement the preadv() and pwritev() syscalls. *BSD has this syscall for
    quite some time.

    Test code:

    #if 0
    set -x
    gcc -Wall -O2 -o preadv $0
    exit 0
    #endif
    /*
    * preadv demo / test
    *
    * (c) 2008 Gerd Hoffmann
    *
    * build with "sh $thisfile"
    */

    #include
    #include
    #include
    #include
    #include
    #include

    /* ----------------------------------------------------------------- */
    /* syscall windup */

    #include
    #if 0
    /* WARNING: Be sure you know what you are doing if you enable this.
    * linux syscall code isn't upstream yet, syscall numbers are subject
    * to change */
    # ifndef __NR_preadv
    # ifdef __i386__
    # define __NR_preadv 333
    # define __NR_pwritev 334
    # endif
    # ifdef __x86_64__
    # define __NR_preadv 295
    # define __NR_pwritev 296
    # endif
    # endif
    #endif
    #ifndef __NR_preadv
    # error preadv/pwritev syscall numbers are unknown
    #endif

    static ssize_t preadv(int fd, const struct iovec *iov, int iovcnt, off_t offset)
    {
    uint32_t pos_high = (offset >> 32) & 0xffffffff;
    uint32_t pos_low = offset & 0xffffffff;

    return syscall(__NR_preadv, fd, iov, iovcnt, pos_high, pos_low);
    }

    static ssize_t pwritev(int fd, const struct iovec *iov, int iovcnt, off_t offset)
    {
    uint32_t pos_high = (offset >> 32) & 0xffffffff;
    uint32_t pos_low = offset & 0xffffffff;

    return syscall(__NR_pwritev, fd, iov, iovcnt, pos_high, pos_low);
    }

    /* ----------------------------------------------------------------- */
    /* demo/test app */

    static char filename[] = "/tmp/preadv-XXXXXX";
    static char outbuf[11] = "0123456789";
    static char inbuf[11] = "----------";

    static struct iovec ovec[2] = {{
    .iov_base = outbuf + 5,
    .iov_len = 5,
    },{
    .iov_base = outbuf + 0,
    .iov_len = 5,
    }};

    static struct iovec ivec[3] = {{
    .iov_base = inbuf + 6,
    .iov_len = 2,
    },{
    .iov_base = inbuf + 4,
    .iov_len = 2,
    },{
    .iov_base = inbuf + 2,
    .iov_len = 2,
    }};

    void cleanup(void)
    {
    unlink(filename);
    }

    int main(int argc, char **argv)
    {
    int fd, rc;

    fd = mkstemp(filename);
    if (-1 == fd) {
    perror("mkstemp");
    exit(1);
    }
    atexit(cleanup);

    /* write to file: "56789-01234" */
    rc = pwritev(fd, ovec, 2, 0);
    if (rc < 0) {
    perror("pwritev");
    exit(1);
    }

    /* read from file: "78-90-12" */
    rc = preadv(fd, ivec, 3, 2);
    if (rc < 0) {
    perror("preadv");
    exit(1);
    }

    printf("result : %s\n", inbuf);
    printf("expected: %s\n", "--129078--");
    exit(0);
    }

    This patch:

    Factor out some code from compat_sys_readv() which can be shared with the
    upcoming compat_sys_preadv().

    Signed-off-by: Gerd Hoffmann
    Cc: Arnd Bergmann
    Cc: Al Viro
    Cc:
    Cc:
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Gerd Hoffmann
     
  • Decompression errors can arise due to corruption of compressed blocks on
    flash or in memory. This patch propagates errors detected during
    decompression back to the block layer.

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

    David VomLehn