aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'upstream-linus' of ↵Linus Torvalds2007-07-1639-1054/+4623
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2 * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2: (32 commits) [PATCH] ocfs2: zero_user_page conversion ocfs2: Support xfs style space reservation ioctls ocfs2: support for removing file regions ocfs2: update truncate handling of partial clusters ocfs2: btree support for removal of arbirtrary extents ocfs2: Support creation of unwritten extents ocfs2: support writing of unwritten extents ocfs2: small cleanup of ocfs2_write_begin_nolock() ocfs2: btree changes for unwritten extents ocfs2: abstract btree growing calls ocfs2: use all extent block suballocators ocfs2: plug truncate into cached dealloc routines ocfs2: simplify deallocation locking ocfs2: harden buffer check during mapping of page blocks ocfs2: shared writeable mmap ocfs2: factor out write aops into nolock variants ocfs2: rework ocfs2_buffered_write_cluster() ocfs2: take ip_alloc_sem during entire truncate ocfs2: Add "preferred slot" mount option [KJ PATCH] Replacing memset(<addr>,0,PAGE_SIZE) with clear_page() in fs/ocfs2/dlm/dlmrecovery.c ...
| * [PATCH] ocfs2: zero_user_page conversionEric Sandeen2007-07-101-11/+2
| | | | | | | | | | Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * ocfs2: Support xfs style space reservation ioctlsMark Fasheh2007-07-106-16/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We re-use the RESVSP/UNRESVSP ioctls from xfs which allow the user to allocate and deallocate regions to a file without zeroing data or changing i_size. Though renamed, the structure passed in from user is identical to struct xfs_flock64. The three fields that are actually used right now are l_whence, l_start and l_len. This should get ocfs2 immediate compatibility with userspace software using the pre-existing xfs ioctls. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * ocfs2: support for removing file regionsMark Fasheh2007-07-104-12/+262
| | | | | | | | | | | | | | | | | | | | Provide an internal interface for the removal of arbitrary file regions. ocfs2_remove_inode_range() takes a byte range within a file and will remove existing extents within that range. Partial clusters will be zeroed so that any read from within the region will return zeros. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * ocfs2: update truncate handling of partial clustersMark Fasheh2007-07-103-46/+35
| | | | | | | | | | | | | | | | | | The partial cluster zeroing code used during truncate usually assumes that the rightmost byte in the range to be zeroed lies on a cluster boundary. This makes sense for truncate, but punching holes might require zeroing on non-aligned rightmost boundaries. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * ocfs2: btree support for removal of arbirtrary extentsMark Fasheh2007-07-101-0/+367
| | | | | | | | | | | | | | | | | | Add code to the btree paths to support the removal of arbitrary regions within an existing extent. With proper higher level support this can be used to "punch holes" in a file. Truncate (a special case of hole punching) could also be converted to use these methods. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * ocfs2: Support creation of unwritten extentsMark Fasheh2007-07-107-28/+105
| | | | | | | | | | | | | | | | | | | | This can now be trivially supported with re-use of our existing extend code. ocfs2_allocate_unwritten_extents() takes a start offset and a byte length and iterates over the inode, adding extents (marked as unwritten) until len is reached. Existing extents are skipped over. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * ocfs2: support writing of unwritten extentsMark Fasheh2007-07-103-26/+84
| | | | | | | | | | | | | | | | | | | | Update the write code to detect when the user is asking to write to an unwritten extent. Like writing to a hole, we must zero the region between the write and the cluster boundaries. Most of the existing cluster zeroing logic can be re-used with some additional checks for the unwritten flag on extent records. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * ocfs2: small cleanup of ocfs2_write_begin_nolock()Mark Fasheh2007-07-101-32/+76
| | | | | | | | | | | | | | We can easily seperate out the write descriptor setup and manipulation into helper functions. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * ocfs2: btree changes for unwritten extentsMark Fasheh2007-07-106-91/+1770
| | | | | | | | | | | | | | | | | | Writes to a region marked as unwritten might result in a record split or merge. We can support splits by making minor changes to the existing insert code. Merges require left rotations which mostly re-use right rotation support functions. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * ocfs2: abstract btree growing callsMark Fasheh2007-07-101-45/+74
| | | | | | | | | | | | | | | | | | The top level calls and logic for growing a tree can easily be abstracted out of ocfs2_insert_extent() into a seperate function - ocfs2_grow_tree(). This allows future code to easily grow btrees when needed. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * ocfs2: use all extent block suballocatorsMark Fasheh2007-07-102-12/+0
| | | | | | | | | | | | | | Now that we have a method to deallocate blocks from them, each node should allocate extent blocks from their local suballocator file. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * ocfs2: plug truncate into cached dealloc routinesMark Fasheh2007-07-105-94/+29
| | | | | | | | Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * ocfs2: simplify deallocation lockingMark Fasheh2007-07-104-21/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Deallocation of suballocator blocks, most notably extent blocks, might involve multiple suballocator inodes. The locking for this can get extremely complicated, especially when the suballocator inodes to delete from aren't known until deep within an unrelated codepath. Implement a simple scheme for recording the blocks to be unlinked so that the actual deallocation can be done in a context which won't deadlock. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * ocfs2: harden buffer check during mapping of page blocksMark Fasheh2007-07-101-1/+2
| | | | | | | | | | | | | | | | We don't want to submit buffer_new blocks for read i/o. This actually won't happen right now because those requests during an allocating write are all nicely aligned. It's probably a good idea to provide an explicit check though. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * ocfs2: shared writeable mmapMark Fasheh2007-07-104-39/+200
| | | | | | | | | | | | | | Implement cluster consistent shared writeable mappings using the ->page_mkwrite() callback. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * ocfs2: factor out write aops into nolock variantsMark Fasheh2007-07-101-40/+80
| | | | | | | | | | | | | | ocfs2_mkwrite() will want this so that it can add some mmap specific checks before asking for a write. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * ocfs2: rework ocfs2_buffered_write_cluster()Mark Fasheh2007-07-103-438/+551
| | | | | | | | | | | | | | | | | | | | | | Use some ideas from the new-aops patch series and turn ocfs2_buffered_write_cluster() into a 2 stage operation with the caller copying data in between. The code now understands multiple cluster writes as a result of having to deal with a full page write for greater than 4k pages. This sets us up to easily call into the write path during ->page_mkwrite(). Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * ocfs2: take ip_alloc_sem during entire truncateMark Fasheh2007-07-102-6/+9
| | | | | | | | | | | | | | Use of the alloc sem during truncate was too narrow - we want to protect the i_size change and page truncation against mmap now. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * ocfs2: Add "preferred slot" mount optionSunil Mushran2007-07-103-5/+31
| | | | | | | | | | | | | | | | | | ocfs2 will attempt to assign the node the slot# provided in the mount option. Failure to assign the preferred slot is not an error. This small feature can be useful for automated testing. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * [KJ PATCH] Replacing memset(<addr>,0,PAGE_SIZE) with clear_page() in ↵Shani Moideen2007-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | fs/ocfs2/dlm/dlmrecovery.c Replacing memset(<addr>,0,PAGE_SIZE) with clear_page() in fs/ocfs2/dlm/dlmrecovery.c Signed-off-by: Shani Moideen <shani.moideen@wipro.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * [PATCH] ocfs2: use list_for_each_entry where beneficalChristoph Hellwig2007-07-106-105/+47
| | | | | | | | | | Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * ocfs2: Wake up a starting region if it gets killed in the background.Joel Becker2007-07-101-1/+20
| | | | | | | | | | | | | | | | | | | | Tell o2cb_region_dev_write() to wake up if rmdir(2) happens on the heartbeat region while it is starting up. Then o2hb_region_dev_write() can check to see if it is alive and act accordingly. This prevents a hang (not being woken) and a crash (if it's woken by a signal). Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * ocfs2: live heartbeat depends on the local node configurationJoel Becker2007-07-103-3/+46
| | | | | | | | | | | | | | | | | | Removing the local node configuration out from underneath a running heartbeat is "bad". Provide an API in the ocfs2 nodemanager to request a configfs dependancy on the local node, then use it in heartbeat. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * ocfs2: Depend on configfs heartbeat items.Joel Becker2007-07-107-17/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | ocfs2 mounts require a heartbeat region. Use the new configfs_depend_item() facility to actually depend on them so they can't go away from under us. First, teach cluster/nodemanager.c to depend an item on the o2cb subsystem. Then teach o2hb_register_callbacks to take a UUID and depend on the appropriate region. Finally, teach all users of o2hb to pass a UUID or NULL if they don't require a pin. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * configfs: config item dependancies.Joel Becker2007-07-104-3/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes other drivers depend on particular configfs items. For example, ocfs2 mounts depend on a heartbeat region item. If that region item is removed with rmdir(2), the ocfs2 mount must BUG or go readonly. Not happy. This provides two additional API calls: configfs_depend_item() and configfs_undepend_item(). A client driver can call configfs_depend_item() on an existing item to tell configfs that it is depended on. configfs will then return -EBUSY from rmdir(2) for that item. When the item is no longer depended on, the client driver calls configfs_undepend_item() on it. These API cannot be called underneath any configfs callbacks, as they will conflict. They can block and allocate. A client driver probably shouldn't calling them of its own gumption. Rather it should be providing an API that external subsystems call. How does this work? Imagine the ocfs2 mount process. When it mounts, it asks for a heart region item. This is done via a call into the heartbeat code. Inside the heartbeat code, the region item is looked up. Here, the heartbeat code calls configfs_depend_item(). If it succeeds, then heartbeat knows the region is safe to give to ocfs2. If it fails, it was being torn down anyway, and heartbeat can gracefully pass up an error. [ Fixed some bad whitespace in configfs.txt. --Mark ] Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * configfs: accessing item hierarchy during rmdir(2)Joel Becker2007-07-103-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a notification callback, ops->disconnect_notify(). It has the same prototype as ->drop_item(), but it will be called just before the item linkage is broken. This way, configfs users who want to do work while the object is still in the heirarchy have a chance. Client drivers will still need to config_item_put() in their ->drop_item(), if they implement it. They need do nothing in ->disconnect_notify(). They don't have to provide it if they don't care. But someone who wants to be notified before ci_parent is set to NULL can now be notified. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * [PATCH] configsfs buffer: use mutexJohannes Berg2007-07-101-7/+8
| | | | | | | | | | | | | | | | | | Seems copied from sysfs, but I don't see a reason here nor there to use a semaphore instead of a mutex. Convert. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * configfs: Convert subsystem semaphore to mutexJoel Becker2007-07-106-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert the su_sem member of struct configfs_subsystem to a struct mutex, as that's what it is. Also convert all the users and update Documentation/configfs.txt and Documentation/configfs_example.c accordingly. [ Conflict in fs/dlm/config.c with commit 3168b0780d06ace875696f8a648d04d6089654e5 manually resolved. --Mark ] Inspired-by: Satyam Sharma <ssatyam@cse.iitk.ac.in> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * [PATCH] configfs+dlm: Rename config_group_find_obj and state semantics clearlySatyam Sharma2007-07-103-16/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Configfs being based upon sysfs code, config_group_find_obj() is probably so named because of the similar kset_find_obj() in sysfs. However, "kobject"s in sysfs become "config_item"s in configfs, so let's call it config_group_find_item() instead, for sake of uniformity, and make corresponding change in the users of this function. BTW a crucial difference between kset_find_obj and config_group_find_item is in locking expectations. kset_find_obj does its locking by itself, but config_group_find_item expects the *caller* to do the locking. The reason for this: kset's have their own locks, config_group's don't but instead rely on the subsystem mutex. And, subsystem needn't necessarily be around when config_group_find_item() is called. So let's state these locking semantics explicitly, and rectify the comment, otherwise bugs could continue to occur in future, as they did in the past (refer commit d82b8191e238 in gfs2-2.6-fixes.git). [ I also took the opportunity to fix some bad whitespace and double-empty lines. --Joel ] [ Conflict in fs/dlm/config.c with commit 3168b0780d06ace875696f8a648d04d6089654e5 manually resolved. --Mark ] Signed-off-by: Satyam Sharma <ssatyam@cse.iitk.ac.in> Cc: David Teigland <teigland@redhat.com> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * [PATCH] configfs+dlm: Separate out __CONFIGFS_ATTR into configfs.hSatyam Sharma2007-07-102-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | fs/dlm/config.c contains a useful generic macro called __CONFIGFS_ATTR that is similar to sysfs' __ATTR macro that makes defining attributes easy for any user of configfs. Separate it out into configfs.h so that other users (forthcoming in dynamic netconsole patchset) can use it too. Signed-off-by: Satyam Sharma <ssatyam@cse.iitk.ac.in> Cc: David Teigland <teigland@redhat.com> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * configfs: misc cleanupsSatyam Sharma2007-07-102-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. item.c:config_item_cleanup() is a private function (only called by config_item_release() in same file). However, it is spuriously exported in include/linux/configfs.h, so remove that export and make it static in item.c. Also, it is no longer exported / interface function, so no need to give comment for this function (the comment was stating obvious thing, anyway). 2. Kernel-doc comment format does not allow empty line between end of comment and start of function (declaration line). There were several such spurious empty lines in item.c, so fix them. fs/configfs/item.c | 15 +++------------ include/linux/configfs.h | 1 - 2 files changed, 3 insertions(+), 13 deletions(-) Signed-off-by: Satyam Sharma <ssatyam@cse.iitk.ac.in> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| * configfs: consistent attribute sizeJoel Becker2007-07-101-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The attribute store/show code currently limits attributes at PAGE_SIZE. This code comes from sysfs, where it still works that way. However, PAGE_SIZE is not constant. A 16k attribute string works on ia64 but not on x86. Really a subsystem shouldn't allow different attribute sizes based on platform. As such, limit all simple attributes to 4k. This works on all platforms, and is consistent with all current code. Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
* | Merge branch 'bsg' of git://git.kernel.dk/data/git/linux-2.6-blockLinus Torvalds2007-07-1613-91/+1341
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'bsg' of git://git.kernel.dk/data/git/linux-2.6-block: (25 commits) bsg: Kconfig updates bsg: add SCSI transport-level request support bsg: add bidi support add a struct request pointer to the request structure bsg: fix the deadlock on discarding done commands bsg: fix a blocking read bug bsg: minor bug fixes improve bsg device allocation bind bsg to all SCSI devices bsg: bind bsg to request_queue instead of gendisk bsg: add a request_queue argument to scsi_cmd_ioctl() bsg: simplify __bsg_alloc_command failpath bsg: add cheasy error checks for sysfs stuff Add queue resizing support Replace s32, u32 and u64 with __s32, __u32 and __u64 in bsg.h for userspace bsg: silence a bogus gcc warning bsg: style cleanup bsg: use u32 etc instead of uint32_t bsg: add SG_IO to SG v4 bsg: replace SG v3 with SG v4 ...
| * | bsg: Kconfig updatesFUJITA Tomonori2007-07-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates bsg entry in Kconfig: - bsg supports sg v4 - bsg depends on SCSI - it might be better to mark it experimental for a while Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * | bsg: add SCSI transport-level request supportFUJITA Tomonori2007-07-162-6/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables bsg to handle SCSI transport-level request like SAS management protocol (SMP). - add BSG_SUB_PROTOCOL_{SCSI_CMD, SCSI_TMF, SCSI_TRANSPORT} definitions. - SCSI transport-level requests skip blk_verify_command(). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * | bsg: add bidi supportFUJITA Tomonori2007-07-161-25/+49
| | | | | | | | | | | | | | | | | | | | | bsg uses the rq->next_rq pointer for a bidi request. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * | add a struct request pointer to the request structureFUJITA Tomonori2007-07-162-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a struct request pointer to the request structure for the second data phase (bidi for now). A request queue supporting bidi requests sets QUEUE_FLAG_BIDI. This prevents sending bidi requests to a non-bidi queue. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * | bsg: fix the deadlock on discarding done commandsFUJITA Tomonori2007-07-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The previous commit introduced a deadlock in discarding commands, because we forget to unlock the bd spinlock. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * | bsg: fix a blocking read bugFUJITA Tomonori2007-07-161-61/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a bug that read() returns ENODATA even with a blocking file descriptor when there are no commands pending. This also includes some cleanups. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * | bsg: minor bug fixesFUJITA Tomonori2007-07-162-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following minor issues: - add EXPORT_SYMBOL_GPL for bsg_register_queue and bsg_unregister_queue. - shut up gcc warnings Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <axboe@nelson.home.kernel.dk>
| * | improve bsg device allocationFUJITA Tomonori2007-07-161-8/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch addresses on two issues on bsg device allocation. - the current maxium number of bsg devices is 256. It's too small if we allocate bsg devices to all SCSI devices, transport entities, etc. This increses the maxium number to 32768 (taken from the sg driver). - SCSI devices are dynamically added and removed. Currently, bsg can't handle it well since bsd_device->minor is simply increased. This is dependent on the patchset that I posted yesterday: http://marc.info/?l=linux-scsi&m=117440208726755&w=2 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * | bind bsg to all SCSI devicesFUJITA Tomonori2007-07-162-15/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch binds bsg to all SCSI devices (their request queues) like the current sg driver does. We can send SCSI commands to non disk and cdrom scsi devices like OSD via bsg. This patch removes bsg_register_queue from blk_register_queue so bsg devices aren't bound to non SCSI block devices. If they want bsg, I'll send a patch to do that. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * | bsg: bind bsg to request_queue instead of gendiskFUJITA Tomonori2007-07-165-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch binds bsg devices to request_queue instead of gendisk. Any objects (like transport entities) can define own request_handler and create own bsg device. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * | bsg: add a request_queue argument to scsi_cmd_ioctl()FUJITA Tomonori2007-07-168-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bsg uses scsi_cmd_ioctl() for some SCSI/sg ioctl commands. scsi_cmd_ioctl() gets a request queue from a gendisk arguement. This prevents bsg being bound to SCSI devices that don't have a gendisk (like OSD). This adds a request_queue argument to scsi_cmd_ioctl(). The SCSI/sg ioctl commands doesn't use a gendisk so it's safe for any SCSI devices to use scsi_cmd_ioctl(). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * | bsg: simplify __bsg_alloc_command failpathFUJITA Tomonori2007-07-161-3/+2
| | | | | | | | | | | | | | | Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * | bsg: add cheasy error checks for sysfs stuffJens Axboe2007-07-161-1/+10
| | | | | | | | | | | | Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * | Add queue resizing supportJens Axboe2007-07-161-64/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just get rid of the preallocated command map, use the slab cache to get/free commands instead. Original patch from FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>, changed by me to not use a mempool. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * | Replace s32, u32 and u64 with __s32, __u32 and __u64 in bsg.h for userspaceFUJITA Tomonori2007-07-161-29/+29
| | | | | | | | | | | | | | | Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * | bsg: silence a bogus gcc warningJens Axboe2007-07-161-1/+1
| | | | | | | | | | | | Signed-off-by: Jens Axboe <jens.axboe@oracle.com>