1. 18 Nov, 2008 7 commits
    • Zhang, Yanmin's avatar
      block: fix boot failure with CONFIG_DEBUG_BLOCK_EXT_DEVT=y and nash · 561ec68e
      Zhang, Yanmin authored
      We run into system boot failure with kernel 2.6.28-rc. We found it on a
      couple of machines, including T61 notebook, nehalem machine, and another
      HPC NX6325 notebook.  All the machines use FedoraCore 8 or FedoraCore 9.
      With kernel prior to 2.6.28-rc, system boot doesn't fail.
      
      I debug it and locate the root cause. Pls. see
      http://bugzilla.kernel.org/show_bug.cgi?id=11899
      https://bugzilla.redhat.com/show_bug.cgi?id=471517
      
      As a matter of fact, there are 2 bugs.
      
      1)root=/dev/sda1, system boot randomly fails. Mostly, boot for 5 times
      and fails once. nash has a bug. Some of its functions misuse return
      value 0.  Sometimes, 0 means timeout and no uevent available. Sometimes,
      0 means nash gets an uevent, but the uevent isn't block-related (for
      exmaple, usb). If by coincidence, kernel tells nash that uevents are
      available, but kernel also set timeout, nash might stops collecting
      other uevents in queue if current uevent isn't block-related.  I work
      out a patch for nash to fix it.
      http://bugzilla.kernel.org/attachment.cgi?id=18858
      
      2) root=LABEL=/, system always can't boot. initrd init reports
      switchroot fails. Here is an executation branch of nash when booting:
          (1) nash read /sys/block/sda/dev; Assume major is 8 (on my desktop)
          (2) nash query /proc/devices with the major number; It found line
      	"8 sd";
          (3) nash use 'sd' to search its own probe table to find device (DISK)
      	type for the device and add it to its own list;
          (4) Later on, it probes all devices in its list to get filesystem
      	labels; scsi register "8 sd" always.
      
      When major is 259, nash fails to find the device(DISK) type. I enables
      CONFIG_DEBUG_BLOCK_EXT_DEVT=y when compiling kernel, so 259 is picked up
      for device /dev/sda1, which causes nash to fail to find device (DISK)
      type.
      
      To fixing issue 2), I create a patch for nash and another patch for
      kernel.
      
      http://bugzilla.kernel.org/attachment.cgi?id=18859
      http://bugzilla.kernel.org/attachment.cgi?id=18837
      
      Below is the patch for kernel 2.6.28-rc4. It registers blkext, a new
      block device in proc/devices.
      
      With 2 patches on nash and 1 patch on kernel, I boot my machines for
      dozens of times without failure.
      
      Signed-off-by Zhang Yanmin <yanmin.zhang@linux.intel.com>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      561ec68e
    • Tejun Heo's avatar
      block/md: fix md autodetection · 55e8e30c
      Tejun Heo authored
      Block ext devt conversion missed md_autodetect_dev() call in
      rescan_partitions() leaving md autodetect unable to see partitions.
      Fix it.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Neil Brown <neilb@suse.de>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      55e8e30c
    • Tejun Heo's avatar
      block: make add_partition() return pointer to hd_struct · ba32929a
      Tejun Heo authored
      Make add_partition() return pointer to the new hd_struct on success
      and ERR_PTR() value on failure.  This change will be used to fix md
      autodetection bug.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Neil Brown <neilb@suse.de>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      ba32929a
    • Tejun Heo's avatar
      block: fix add_partition() error path · eb60fa10
      Tejun Heo authored
      Partition stats structure was not freed on devt allocation failure
      path.  Fix it.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      eb60fa10
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 · 4e14e833
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
        prevent cifs_writepages() from skipping unwritten pages
        Fixed parsing of mount options when doing DFS submount
        [CIFS] Fix check for tcon seal setting and fix oops on failed mount from earlier patch
        [CIFS] Fix build break
        cifs: reinstate sharing of tree connections
        [CIFS] minor cleanup to cifs_mount
        cifs: reinstate sharing of SMB sessions sans races
        cifs: disable sharing session and tcon and add new TCP sharing code
        [CIFS] clean up server protocol handling
        [CIFS] remove unused list, add new cifs sock list to prepare for mount/umount fix
        [CIFS] Fix cifs reconnection flags
        [CIFS] Can't rely on iov length and base when kernel_recvmsg returns error
      4e14e833
    • Dave Kleikamp's avatar
      prevent cifs_writepages() from skipping unwritten pages · b066a48c
      Dave Kleikamp authored
      Fixes a data corruption under heavy stress in which pages could be left
      dirty after all open instances of a inode have been closed.
      
      In order to write contiguous pages whenever possible, cifs_writepages()
      asks pagevec_lookup_tag() for more pages than it may write at one time.
      Normally, it then resets index just past the last page written before calling
      pagevec_lookup_tag() again.
      
      If cifs_writepages() can't write the first page returned, it wasn't resetting
      index, and the next call to pagevec_lookup_tag() resulted in skipping all of
      the pages it previously returned, even though cifs_writepages() did nothing
      with them.  This can result in data loss when the file descriptor is about
      to be closed.
      
      This patch ensures that index gets set back to the next returned page so
      that none get skipped.
      Signed-off-by: default avatarDave Kleikamp <shaggy@linux.vnet.ibm.com>
      Acked-by: default avatarJeff Layton <jlayton@redhat.com>
      Cc: Shirish S Pargaonkar <shirishp@us.ibm.com>
      Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
      b066a48c
    • Igor Mammedov's avatar
      Fixed parsing of mount options when doing DFS submount · 2c55608f
      Igor Mammedov authored
      Since these hit the same routines, and are relatively small, it is easier to review
      them as one patch.
      
      Fixed incorrect handling of the last option in some cases
      Fixed prefixpath handling convert path_consumed into host depended string length (in bytes)
      Use non default separator if it is provided in the original mount options
      Acked-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarIgor Mammedov <niallain@gmail.com>
      Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
      2c55608f
  2. 17 Nov, 2008 12 commits
  3. 16 Nov, 2008 16 commits
  4. 15 Nov, 2008 5 commits
    • Ron Madrid's avatar
      phy: Add support for Marvell 88E1118 PHY · 605f196e
      Ron Madrid authored
      This patch will add support for the Marvell 88E1118 PHY which supports gigabit ethernet among other things.
      Signed-off-by: default avatarRon Madrid <ron_madrid@sbcglobal.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      605f196e
    • Yevgeny Petrilin's avatar
      mlx4_en: Pause parameters per port · d53b93f2
      Yevgeny Petrilin authored
      Before the change the driver reported the same pause parameters
      for all the ports, even only one of them was modified.
      Signed-off-by: default avatarYevgeny Petrilin <yevgenyp@mellanox.co.il>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d53b93f2
    • Linus Torvalds's avatar
      Linux 2.6.28-rc5 · 9bf1a244
      Linus Torvalds authored
      9bf1a244
    • Al Viro's avatar
      Fix inotify watch removal/umount races · 8f7b0ba1
      Al Viro authored
      Inotify watch removals suck violently.
      
      To kick the watch out we need (in this order) inode->inotify_mutex and
      ih->mutex.  That's fine if we have a hold on inode; however, for all
      other cases we need to make damn sure we don't race with umount.  We can
      *NOT* just grab a reference to a watch - inotify_unmount_inodes() will
      happily sail past it and we'll end with reference to inode potentially
      outliving its superblock.
      
      Ideally we just want to grab an active reference to superblock if we
      can; that will make sure we won't go into inotify_umount_inodes() until
      we are done.  Cleanup is just deactivate_super().
      
      However, that leaves a messy case - what if we *are* racing with
      umount() and active references to superblock can't be acquired anymore?
      We can bump ->s_count, grab ->s_umount, which will almost certainly wait
      until the superblock is shut down and the watch in question is pining
      for fjords.  That's fine, but there is a problem - we might have hit the
      window between ->s_active getting to 0 / ->s_count - below S_BIAS (i.e.
      the moment when superblock is past the point of no return and is heading
      for shutdown) and the moment when deactivate_super() acquires
      ->s_umount.
      
      We could just do drop_super() yield() and retry, but that's rather
      antisocial and this stuff is luser-triggerable.  OTOH, having grabbed
      ->s_umount and having found that we'd got there first (i.e.  that
      ->s_root is non-NULL) we know that we won't race with
      inotify_umount_inodes().
      
      So we could grab a reference to watch and do the rest as above, just
      with drop_super() instead of deactivate_super(), right? Wrong.  We had
      to drop ih->mutex before we could grab ->s_umount.  So the watch
      could've been gone already.
      
      That still can be dealt with - we need to save watch->wd, do idr_find()
      and compare its result with our pointer.  If they match, we either have
      the damn thing still alive or we'd lost not one but two races at once,
      the watch had been killed and a new one got created with the same ->wd
      at the same address.  That couldn't have happened in inotify_destroy(),
      but inotify_rm_wd() could run into that.  Still, "new one got created"
      is not a problem - we have every right to kill it or leave it alone,
      whatever's more convenient.
      
      So we can use idr_find(...) == watch && watch->inode->i_sb == sb as
      "grab it and kill it" check.  If it's been our original watch, we are
      fine, if it's a newcomer - nevermind, just pretend that we'd won the
      race and kill the fscker anyway; we are safe since we know that its
      superblock won't be going away.
      
      And yes, this is far beyond mere "not very pretty"; so's the entire
      concept of inotify to start with.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Acked-by: default avatarGreg KH <greg@kroah.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8f7b0ba1
    • Huang Weiyi's avatar
      LIS3LV02Dx: remove unused #include <version.h> · 0d3b7100
      Huang Weiyi authored
      The file(s) below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
        drivers/hwmon/lis3lv02d.c
      
      This patch removes the said #include <version.h>.
      Signed-off-by: default avatarHuang Weiyi <weiyi.huang@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0d3b7100