30 Apr, 2013

40 commits

  • Use preferable function name which implies using a pseudo-random
    number generator.

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

    Akinobu Mita
     
  • Use preferable function name which implies using a pseudo-random
    number generator.

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

    Akinobu Mita
     
  • Use preferable function name which implies using a pseudo-random
    number generator.

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

    Akinobu Mita
     
  • Use preferable function name which implies using a pseudo-random
    number generator.

    Signed-off-by: Akinobu Mita
    Acked-by: H. Peter Anvin
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • pageattr-test calls srandom32() once every test iteration. But calling
    srandom32() after late_initcalls is not meaningfull. Because the random
    states for random32() is mixed by good random numbers in late_initcall
    prandom_reseed().

    So this removes the call to srandom32().

    Signed-off-by: Akinobu Mita
    Acked-by: H. Peter Anvin
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • Use prandom_bytes() to generate 16 bytes of pseudo-random bytes.

    Signed-off-by: Akinobu Mita
    Cc: "Theodore Ts'o"
    Cc: Huang Ying
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • Use prandom_bytes() to generate random bytes for test data.

    Signed-off-by: Akinobu Mita
    Cc: Dan Williams
    Cc: Vinod Koul
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • Signed-off-by: Jeff Layton
    Cc: Vlad Yasevich
    Cc: Sridhar Samudrala
    Cc: Neil Horman
    Cc: "David S. Miller"
    Cc: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Layton
     
  • Signed-off-by: Jeff Layton
    Cc: John McCutchan
    Cc: Robert Love
    Cc: Eric Paris
    Cc: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Layton
     
  • Signed-off-by: Jeff Layton
    Acked-by: "J. Bruce Fields"
    Cc: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Layton
     
  • Signed-off-by: Jeff Layton
    Cc: Tejun Heo
    Cc: Jack Morgenstein
    Cc: Or Gerlitz
    Cc: Roland Dreier
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Layton
     
  • Signed-off-by: Jeff Layton
    Reviewed-by: Tejun Heo
    Cc: Steve Wise
    Cc: Tom Tucker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Layton
     
  • As Tejun points out, there are several users of the IDR facility that
    attempt to use it in a cyclic fashion. These users are likely to see
    -ENOSPC errors after the counter wraps one or more times however.

    This patchset adds a new idr_alloc_cyclic routine and converts several
    of these users to it. Many of these users are in obscure parts of the
    kernel, and I don't have a good way to test some of them. The change is
    pretty straightforward though, so hopefully it won't be an issue.

    There is one other cyclic user of idr_alloc that I didn't touch in
    ipc/util.c. That one is doing some strange stuff that I didn't quite
    understand, but it looks like it should probably be converted later
    somehow.

    This patch:

    Thus spake Tejun Heo:

    Ooh, BTW, the cyclic allocation is broken. It's prone to -ENOSPC
    after the first wraparound. There are several cyclic users in the
    kernel and I think it probably would be best to implement cyclic
    support in idr.

    This patch does that by adding new idr_alloc_cyclic function that such
    users in the kernel can use. With this, there's no need for a caller to
    keep track of the last value used as that's now tracked internally. This
    should prevent the ENOSPC problems that can hit when the "last allocated"
    counter exceeds INT_MAX.

    Later patches will convert existing cyclic users to the new interface.

    Signed-off-by: Jeff Layton
    Reviewed-by: Tejun Heo
    Cc: "David S. Miller"
    Cc: "J. Bruce Fields"
    Cc: Eric Paris
    Cc: Jack Morgenstein
    Cc: John McCutchan
    Cc: Neil Horman
    Cc: Or Gerlitz
    Cc: Robert Love
    Cc: Roland Dreier
    Cc: Sridhar Samudrala
    Cc: Steve Wise
    Cc: Tom Tucker
    Cc: Vlad Yasevich

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

    Jeff Layton
     
  • Add descriptions about 'stale_rw' and 'nostale_ro' nfs options in
    filesystem/vfat.txt

    Signed-off-by: Namjae Jeon
    Signed-off-by: Ravishankar N
    Signed-off-by: Amit Sahrawat
    Acked-by: OGAWA Hirofumi
    Acked-by: Rob Landley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namjae Jeon
     
  • This patch enables rebuilding of directory inodes which are not present in
    the cache.This is done by traversing the disk clusters to find the
    directory entry of the parent directory and using its i_pos to build the
    inode.

    The traversal is done by fat_scan_logstart() which is similar to
    fat_scan() but matches i_pos values instead of names.fat_scan_logstart()
    needs an inode parameter to work, for which a dummy inode is created by
    it's caller fat_rebuild_parent(). This dummy inode is destroyed after the
    traversal completes.

    All this is done only if the nostale_ro nfs mount option is specified.

    Signed-off-by: Namjae Jeon
    Signed-off-by: Ravishankar N
    Signed-off-by: Amit Sahrawat
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namjae Jeon
     
  • If the cache lookups fail,use the i_pos value to find the directory entry
    of the inode and rebuild the inode.Since this involves accessing the FAT
    media, do this only if the nostale_ro nfs mount option is specified.

    Signed-off-by: Namjae Jeon
    Signed-off-by: Ravishankar N
    Signed-off-by: Amit Sahrawat
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namjae Jeon
     
  • Define two nfs export_operation structures,one for 'stale_rw' mounts and
    the other for 'nostale_ro'. The latter uses i_pos as a basis for encoding
    and decoding file handles.

    Also, assign i_pos to kstat->ino. The logic for rebuilding the inode is
    added in the subsequent patches.

    Signed-off-by: Namjae Jeon
    Signed-off-by: Ravishankar N
    Signed-off-by: Amit Sahrawat
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namjae Jeon
     
  • Introduce helper function to get the block number and offset for a given
    i_pos value. Use it in __fat_write_inode() now and later on in nfs.c

    Signed-off-by: Namjae Jeon
    Signed-off-by: Ravishankar N
    Signed-off-by: Amit Sahrawat
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namjae Jeon
     
  • Move fat_i_pos_read to fat.h so that it can be called from nfs.c in the
    subsequent patches to encode the file handle.

    Signed-off-by: Namjae Jeon
    Signed-off-by: Ravishankar N
    Signed-off-by: Amit Sahrawat
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namjae Jeon
     
  • This patchset eliminates the client side ESTALE errors when a FAT
    partition exported over NFS has its dentries evicted from the cache. The
    idea is to find the on-disk location_'i_pos' of the dirent of the inode
    that has been evicted and use it to rebuild the inode.

    This patch:

    Provide two possible values 'stale_rw' and 'nostale_ro' for the -o nfs
    mount option.The first one allows all file operations but does not reduce
    ESTALE errors on memory constrained systems. The second one eliminates
    ESTALE errors but mounts the filesystem as read-only. Not specifying a
    value defaults to 'stale_rw'.

    Signed-off-by: Namjae Jeon
    Signed-off-by: Ravishankar N
    Signed-off-by: Amit Sahrawat
    Acked-by: OGAWA Hirofumi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namjae Jeon
     
  • Fix to return -ENODEV in the chip not found error handling
    case instead of 0, as done elsewhere in this function.

    Signed-off-by: Wei Yongjun
    Cc: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wei Yongjun
     
  • rtc8564 appears in i2c_device_id table of both rtc-isl12022.c and
    rtc-pcf8563.c. Commit 8ea9212cbd65 "rtc-pcf8563: add chip id" added the
    rtc8564 chip entry to pcf8563. isl12022 driver is modified from pcf8563
    driver, so this looks like a copy-paste bug.

    Signed-off-by: Axel Lin
    Cc: Roman Fietze
    Cc: Jon Smirl
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • Add missing iounmap to probe error path and remove.

    Signed-off-by: Johan Hovold
    Acked-by: Nicolas Ferre
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johan Hovold
     
  • Instead of using legacy suspend/resume methods, using newer dev_pm_ops
    structure allows better control over power management.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Instead of using legacy suspend/resume methods, using newer dev_pm_ops
    structure allows better control over power management.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Instead of using legacy suspend/resume methods, using newer dev_pm_ops
    structure allows better control over power management.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Instead of using legacy suspend/resume methods, using newer dev_pm_ops
    structure allows better control over power management.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Instead of using legacy suspend/resume methods, using newer dev_pm_ops
    structure allows better control over power management.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Instead of using legacy suspend/resume methods, using newer dev_pm_ops
    structure allows better control over power management.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Instead of using legacy suspend/resume methods, using newer dev_pm_ops
    structure allows better control over power management.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Instead of using legacy suspend/resume methods, using newer dev_pm_ops
    structure allows better control over power management.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Current code has defines for registers, use the defines rather than
    magic numbers.

    Signed-off-by: Axel Lin
    Cc: Raphael Assenat
    Cc: Alessandro Zummo
    Cc: Wu Fengguang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Axel Lin
     
  • Use devm_*() functions to make cleanup paths simpler.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Use devm_*() functions to make cleanup paths simpler.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Use devm_*() functions to make cleanup paths simpler.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Use devm_*() functions to make cleanup paths simpler.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Use devm_*() functions to make cleanup paths simpler.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Use devm_*() functions to make cleanup paths simpler.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Use devm_*() functions to make cleanup paths simpler.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han
     
  • Use devm_*() functions to make cleanup paths simpler.

    Signed-off-by: Jingoo Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jingoo Han