[IA64] Use bitmaps for efficient context allocation/free

Corrects the very inefficent method of finding free context_ids in
get_mmu_context().  Instead of walking the task_list of all processes,
2 bitmaps are used to efficently store and lookup state, inuse and
needs flushing. The entire rid address space is now used before calling
wrap_mmu_context and global tlb flushing.

Special thanks to Ken and Rohit for their review and modifications in
using a bit flushmap.

Signed-off-by: Peter Keilty <peter.keilty@hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
JFS: set i_ctime & i_mtime on target directory when creating links

jfs has never been setting i_ctime or i_mtime when creating either hard
or symbolic links.  I'm surprised nobody had noticed until now.

Thanks to Chris Spiegel for reporting the problem.

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
[CIFS] Make CONFIG_CIFS_EXPERIMENTAL depend on CONFIG_EXPERIMENTAL

It seems logical.

Note that CONFIG_EXPERIMENTAL itself doesn't enable any code.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Steve French <sfrench@us.ibm.com>
[IA64] make mmu_context.h and tlb.c 80-column friendly

wrap_mmu_context(), delayed_tlb_flush(), get_mmu_context() all
have an extra { } block which cause one extra indentation.
get_mmu_context() is particularly bad with 5 indentations to
the most inner "if".  It finally gets on my nerve that I can't
keep the code within 80 columns.  Remove the extra { } block
and while I'm at it, reformat all the comments to 80-column
friendly.  No functional change at all with this patch.

Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
[CIFS] Update kconfig for cifs

Add cifs extended stats configure option and reduce experimental code.

Signed-off-by: Steve French <sfrench@us.ibm.com>
[IB] mthca: report page size capability

Report the device's real page size capability in mthca_query_device().

Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
[SCSI] Fix transport class oops

There's an oops that sometimes shows up with SCSI transport classes in
sysfs_hash_and_remove.  The problem is that now, because of the class to
device and vice versa symlinks, all classes have to be removed from
visibility *before* the device is removed from visibility.

The transport class trigger points violate this, so bring them back into
conformance.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] raid class update

- Update raid class to use nested classes for raid components (this will
allow us to move to a component control model now)
- Make the raid level an enumeration rather than and int.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] ips: remove "Version Matching"

IBM has finally agreed that the "Version Matching" between firmware and
drivers ( and the resulting warning messages ) is no longer necessary.
This patch will remove those functions from the ServeRAID driver.

Signed-off-by: Jack Hammer <jack_hammer@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] Documentation: typo in scsi/scsi_eh.txt

undefined symbol in Documentation/scsi/scsi_eh.txt

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] ide-scsi fails to call idescsi_check_condition for things like "Medium not present"

This patch started life as a response to fedora specific ide subsystem changes
that made error handling of my ATAPI tape drive fail; the specifics are in

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=160868

The insertion of the statement rq->errors = err; near the end of
ide_end_drive_cmd() in drivers/ide/ide-io.c means that rq->errors does not
contain what it needs to in idescsi_end_request() in drivers/scsi/ide-scsi.c
anymore. Recent mainline kernels now also have this change.

Signed-off-by: Willem Riede <wrlk@riede.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] tidy up scsi_error_handler

adjust comments, remove a useless cast and remove a write-only variable.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] remove Scsi_Host.eh_active

now that the abuse in qla2xxx is gone this field can be remove.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] remove scsi_wait_req

This function has been superceeded by the block request based interfaces
and is unused (except for the uncompilable cpqfc driver).

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] use a completion in scsi_send_eh_cmnd

scsi_send_eh_cmnd currently uses a semaphore and an overload of eh_timer
to either get a completion for a command for a timeout.
Switch to using a completion and wait_for_completion_timeout to simply
the code and not having to deal with the races ourselves.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] megaraid_sas: fix EH locking

recent kernels call the eh_ methods without the host lock held.
megaraid_sas doesn't need it but drops it before calling a sleeping
routine and reqcquires it afterwards.  Just remove the
spin_unlock/spin_lock calls.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] megaraid_mbox: remove scsi_assign_lock usage

also remove the adapter->host_lock alias for adapter->lock and remove
some superflous locking aswell as removing the tiny locking wrappers
for the EH routines.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] megaraid (legacy): remove scsi_assign_lock usage

just take the adapter lock in megaraid_queue.  Additional benefit is
that we can get rid of the awkward conditional locking in
mega_internal_command.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] aic7xxx: remove scsi_assign_lock usage

just take the internal lock in queuecommand instead.  also switch
the only direct use of the internal lock to the wrappers used elsewhere.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
[SCSI] aic79xx: remove scsi_assign_lock usage

just take the internal lock in queuecommand instead.  also switch
the only direct use of the internal lock to the wrappers used elsewhere.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>