Skip to content
  1. Dec 02, 2011
    • Akinobu Mita's avatar
      ocfs2: avoid unaligned access to dqc_bitmap · 93925579
      Akinobu Mita authored
      
      
      The dqc_bitmap field of struct ocfs2_local_disk_chunk is 32-bit aligned,
      but not 64-bit aligned.  The dqc_bitmap is accessed by ocfs2_set_bit(),
      ocfs2_clear_bit(), ocfs2_test_bit(), or ocfs2_find_next_zero_bit().  These
      are wrapper macros for ext2_*_bit() which need to take an unsigned long
      aligned address (though some architectures are able to handle unaligned
      address correctly)
      
      So some 64bit architectures may not be able to access the dqc_bitmap
      correctly.
      
      This avoids such unaligned access by using another wrapper functions for
      ext2_*_bit().  The code is taken from fs/ext4/mballoc.c which also need to
      handle unaligned bitmap access.
      
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Acked-by: default avatarJoel Becker <jlbec@evilplan.org>
      Cc: Mark Fasheh <mfasheh@suse.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJoel Becker <jlbec@evilplan.org>
      93925579
  2. Nov 17, 2011
  3. Aug 22, 2011
  4. Jul 28, 2011
    • Jan Kara's avatar
      ocfs2: Avoid livelock in ocfs2_readpage() · c7e25e6e
      Jan Kara authored
      
      
      When someone writes to an inode, readers accessing the same inode via
      ocfs2_readpage() just busyloop trying to get ip_alloc_sem because
      do_generic_file_read() looks up the page again and retries ->readpage()
      when previous attempt failed with AOP_TRUNCATED_PAGE. When there are enough
      readers, they can occupy all CPUs and in non-preempt kernel the system is
      deadlocked because writer holding ip_alloc_sem is never run to release the
      semaphore. Fix the problem by making reader block on ip_alloc_sem to break
      the busy loop.
      
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarJoel Becker <jlbec@evilplan.org>
      c7e25e6e
    • Mark Fasheh's avatar
      ocfs2: serialize unaligned aio · a11f7e63
      Mark Fasheh authored
      Fix a corruption that can happen when we have (two or more) outstanding
      aio's to an overlapping unaligned region.  Ext4
      (e9e3bcec
      
      ) and xfs recently had to fix
      similar issues.
      
      In our case what happens is that we can have an outstanding aio on a region
      and if a write comes in with some bytes overlapping the original aio we may
      decide to read that region into a page before continuing (typically because
      of buffered-io fallback).  Since we have no ordering guarantees with the
      aio, we can read stale or bad data into the page and then write it back out.
      
      If the i/o is page and block aligned, then we avoid this issue as there
      won't be any need to read data from disk.
      
      I took the same approach as Eric in the ext4 patch and introduced some
      serialization of unaligned async direct i/o.  I don't expect this to have an
      effect on the most common cases of AIO.  Unaligned aio will be slower
      though, but that's far more acceptable than data corruption.
      
      Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
      Signed-off-by: default avatarJoel Becker <jlbec@evilplan.org>
      a11f7e63
  5. Jul 26, 2011
    • Sunil Mushran's avatar
      ocfs2: Implement llseek() · 93862d5e
      Sunil Mushran authored
      
      
      ocfs2 implements its own llseek() to provide the SEEK_HOLE/SEEK_DATA
      functionality.
      
      SEEK_HOLE sets the file pointer to the start of either a hole or an unwritten
      (preallocated) extent, that is greater than or equal to the supplied offset.
      
      SEEK_DATA sets the file pointer to the start of an allocated extent (not
      unwritten) that is greater than or equal to the supplied offset.
      
      If the supplied offset is on a desired region, then the file pointer is set
      to it. Offsets greater than or equal to the file size return -ENXIO.
      
      Unwritten (preallocated) extents are considered holes because the file system
      treats reads to such regions in the same way as it does to holes.
      
      Signed-off-by: default avatarSunil Mushran <sunil.mushran@oracle.com>
      93862d5e
  6. Jul 25, 2011
  7. Jul 24, 2011
    • Alessio Igor Bogani's avatar
      modpost: Fix modpost's license checking V3 · 62a26356
      Alessio Igor Bogani authored
      The commit f02e8a65
      
       sorts symbols placing each of them in its own elf section.
      The sorting and merging into the canonical sections are done by the linker.
      Unfortunately modpost to generate Module.symvers file parses vmlinux
      (already linked) and all modules object files (which aren't linked yet).
      These aren't sanitized by the linker yet. That breaks modpost that can't
      detect license properly for modules. This patch makes modpost aware of
      the new exported symbols structure.
      
      Thanks to Arnaud Lacombe <lacombar@gmail.com> and Anders Kaseorg
      <andersk@ksplice.com> for providing useful suggestions about code.
      
      This work was supported by a hardware donation from the CE Linux Forum.
      
      Reported-by: default avatarJan Beulich <jbeulich@novell.com>
      Signed-off-by: default avatarAlessio Igor Bogani <abogani@kernel.org>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      62a26356
    • Kay Sievers's avatar
      module: add /sys/module/<name>/uevent files · 88bfa324
      Kay Sievers authored
      
      
      Userspace wants to manage module parameters with udev rules.
      This currently only works for loaded modules, but not for
      built-in ones.
      
      To allow access to the built-in modules we need to
      re-trigger all module load events that happened before any
      userspace was running. We already do the same thing for all
      devices, subsystems(buses) and drivers.
      
      This adds the currently missing /sys/module/<name>/uevent files
      to all module entries.
      
      Signed-off-by: default avatarKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (split & trivial fix)
      88bfa324
    • Kay Sievers's avatar
      module: change attr callbacks to take struct module_kobject · 4befb026
      Kay Sievers authored
      
      
      This simplifies the next patch, where we have an attribute on a
      builtin module (ie. module == NULL).
      
      Signed-off-by: default avatarKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (split into 2)
      4befb026