1. 18 Mar, 2004 22 commits
    • Jeff Garzik's avatar
      [libata] increase max from UDMA/100 to UDMA/133 for some drivers · cfa0250d
      Jeff Garzik authored
      ServerWorks and Vitesse driver transfer mode maximums were
      incorrectly too low.
      cfa0250d
    • Jeff Garzik's avatar
      [libata] explicitly set consistent DMA mask to 0xffffffff · d93bf80c
      Jeff Garzik authored
      Do not rely on the default being 0xffffffff.
      d93bf80c
    • Jeff Garzik's avatar
      Merge redhat.com:/spare/repo/linux-2.6 · 3b059816
      Jeff Garzik authored
      into redhat.com:/spare/repo/libata-2.6
      3b059816
    • Jeff Garzik's avatar
      4f4a9689
    • David Howells's avatar
      [PATCH] FD_CLOEXEC fcntl cleanup · dc5178fa
      David Howells authored
      This fixes a minor problem with fcntl.
      
      get_close_on_exec() uses FD_ISSET() to determine the fd state, but this
      is not guaranteed to be either 0 of FD_CLOEXEC.  Make that explicit.
      
      Also, the argument of set_close_on_exec() is being AND'ed with the
      literal constant 1.  Make it use an explicit FD_CLOEXEC test.
      dc5178fa
    • Linus Torvalds's avatar
      Make ppc64 __FD_ISSET() return a proper boolean return value. · 437117bf
      Linus Torvalds authored
      (The broken macro only triggers for non-gcc compiles, but
      still..)
      437117bf
    • Bartlomiej Zolnierkiewicz's avatar
      [PATCH] add missing MODULE_DEVICE_TABLE() to IDE PCI drivers · 2b34fa5f
      Bartlomiej Zolnierkiewicz authored
      Original patch from Hannes Reinecke <hare@suse.de>.
      
      This is required to have modular IDE drivers announce themselves
      properly in modules.pcimap.
      2b34fa5f
    • Linus Torvalds's avatar
      1ddcf61a
    • Rusty Russell's avatar
      [PATCH] Implement migrate_all_tasks · ae01bd8f
      Rusty Russell authored
      Implement migrate_all_tasks() which moves tasks off cpu while machine
      is stopped.
      ae01bd8f
    • Rusty Russell's avatar
      [PATCH] Export cpu notifiers and do locking. · 30d67695
      Rusty Russell authored
      The registration and unregistration of CPU notifiers should be done
      under the cpucontrol sem.  They should also be exported.
      30d67695
    • Alexander Viro's avatar
      [PATCH] hpfs: general cleanup · ea747b67
      Alexander Viro authored
      include files moved to fs/hpfs/, gratitious #include removed, stuff that
      doesn't have to be global made static, misindented chunk of
      hpfs_readdir() put in place, etc.
      ea747b67
    • Alexander Viro's avatar
      [PATCH] hpfs: fix locking scheme · 9c96c8be
      Alexander Viro authored
      	Fixed the locking scheme.  The need of extra locking was caused by
      the fact that hpfs_write_inode() must update directory entry; since HPFS
      directories are implemented as b-trees, we must provide protection both
      against rename() (to make sure that we update the entry in right directory)
      and against rebalancing of the parent.
      
      	Old scheme had both deadlocks and races - to start with, we had no
      protection against rename()/unlink()/rmdir(), since (a) locking parent
      was done without any warranties that it will remain our parent and (b)
      check that we still have a directory entry (== have positive nlink) was
      done before we tried to lock the parent.  Moreover, iget serialization
      killed two steps ago gave immediate deadlocks if iget() of parent had
      triggered another hpfs_write_inode().
      
      	New scheme introduces another per-inode semaphore (hpfs-only,
      obviously) protecting the reference to parent.  It's taken on
      rename/rmdir/unlink victims and inode being moved by rename.  Old semaphores
      are taken only on parent(s) and only after we grab one(s) of the new kind.
      hpfs_write_inode() gets the new semaphore on our inode, checks nlink and
      if it's non-zero grabs parent and takes the old semaphore on it.
      
      	Order among the semaphores of the same kind is arbitrary - the only
      function that might take more than one of the same kind is hpfs_rename()
      and it's serialized by VFS.
      
      	We might get away with only one semaphore, but then the ordering
      issues would bite us big way - we would have to make sure that child is
      always locked before parent (hpfs_write_inode() leaves no other choice)
      and while that's easy to do for almost all operations, rename() is a bitch -
      as always.  And per-superblock rwsem giving rename() vs. write_inode()
      exclusion on hpfs would make the entire thing too baroque for my taste.
      	->readdir() takes no locks at all (protection against directory
      modifications is provided by VFS exclusion), ditto for ->lookup().
      	->llseek() on directories switched to use of (VFS) ->i_sem, so
      it's safe from directory modifications and ->readdir() is safe from it -
      no hpfs locks are needed here.
      9c96c8be
    • Alexander Viro's avatar
      [PATCH] hpfs: deadlock fixes · d9013aae
      Alexander Viro authored
      We used to have GFP_KERNEL kmalloc() done by the code that held hpfs
      lock on directory.  That could trigger a call of hpfs_write_inode() and
      deadlock; fixed by switch to GFP_NOFS.  Same for hpfs inodes themselves
      - hpfs_write_inode() calls iget() and that could trigger both the
      deadlocks (avoidable with very baroque locking scheme) and stack
      overflows (unavoidable unless we kill potential recursion here).
      d9013aae
    • Alexander Viro's avatar
      [PATCH] hpfs: hpfs iget locking cleanup · 772fd530
      Alexander Viro authored
      Killed the nightmares in hpfs iget handling.  Since in some (fairly
      frequent) cases hpfs_read_inode() could avoid any IO (basically, lookup
      hitting a native HPFS regular file can get all data from directory
      entry) hpfs had a flag passed to that sucker.  Said flag had been
      protected by a semaphore lookalike made out of spit and duct-tape and
      callers of iget looked like
      
      	hpfs_lock_iget(sb, flag);
      	result = iget(sb, ino);
      	hpfs_unlock_iget(sb);
      
      Since now we are calling hpfs_read_inode() directly (note that calling
      it without hpfs_lock_iget() would simply break) we can forget all that
      crap and get rid of the flag - caller knows what it wants to call.
      
      BTW, that had killed one of the last sleep_on() users in fs/*/*.
      772fd530
    • Alexander Viro's avatar
      [PATCH] hpfs: hpfs iget locking cleanup preparation · b5b83bae
      Alexander Viro authored
      	Preparation to hpfs iget locking cleanup - remaining iget() callers
      replaced with explicit iget_locked() + call hpfs_read_inode()/unlock_new_inode()
      if inode is new.
      b5b83bae
    • Alexander Viro's avatar
      [PATCH] hpfs: new/read/write_inode() cleanups · eb3a6d15
      Alexander Viro authored
      	1) common initialization for all paths in hpfs_read_inode() taken into
      a separate helper (hpfs_init_inode())
      	2) hpfs mkdir(),create(),mknod() and symlink() do not bother with
      iget() anymore - they call new_inode(), do initializations and insert new
      inode into icache.  Handling of OOM failures cleaned up - if we can't
      allocate in-core inode, bail instead of corrupting the filesystem.
      Allocating in-core inode early also avoids one of the deadlocks here
      (hpfs_write_inode() from memory pressure by kmem_cache_alloc() could
      deadlock on attempt to lock our directory).
      	3) hpfs_write_inode() marks the inode dirty again in case if it
      fails to iget() its parent directory.  Again, OOM could trigger fs corruption
      here.
      eb3a6d15
    • Alexander Viro's avatar
      [PATCH] hpfs: clean up lock ordering · fde48def
      Alexander Viro authored
      	hpfs_{lock,unlock}_{2,3}inodes() killed; all places that take more than
      one lock have ->i_sem held by VFS on all inodes involved and all hpfs per-inode
      locks are of the same type.  IOW, we can replace these guys with multiple
      hpfs_lock_inode() - order doesn't matter here.
      fde48def
    • Alexander Viro's avatar
      [PATCH] hpfs: namei.c failure case cleanups · c4357dfe
      Alexander Viro authored
      Failure exits in hpfs/namei.c merged and cleaned up.
      c4357dfe
    • Jeff Garzik's avatar
      [libata sata_sil] add post-set-mode hook to libata, use it · 310d420e
      Jeff Garzik authored
      Silicon Image has a register that indicates the data transfer mode
      (pio-old, pio-new, mdma or udma) that must be initialized after
      the SET FEATURES - XFER command has been issued.  This requires a
      hook in libata core to set the register at the right time.
      
      Also, limit to UDMA5 due to scary comments in FreeBSD about chip errata.
      310d420e
    • Jeff Garzik's avatar
      [libata] API cleanup · fd382b8f
      Jeff Garzik authored
      Remove ->phy_config hook, everybody used pata_phy_config.  Rename
      function to ata_set_mode, and directly call internally.
      fd382b8f
    • Jeff Garzik's avatar
      [libata sata_sil] port init cleanup, mask SATA phy interrupts · 45e79175
      Jeff Garzik authored
      * don't define a constant for each of four sets of register block
        offsets, use a table instead.
      * mask all SATA phy interrupt events, for each port
      45e79175
    • Jeff Garzik's avatar
      [libata] update dma start/stop path to only set/clear the bits we care about · 4b01f66c
      Jeff Garzik authored
      Legacy IDE software has traditionally unconditionally cleared the
      bits in the IDE BMDMA control register, but at least one controller
      has important bits in the 'reserved' area that we don't want to touch.
      So now, we only set/clear the data-direction and dma-start bits, and
      leave the rest alone.
      4b01f66c
  2. 17 Mar, 2004 18 commits