- 22 Dec, 2010 2 commits
-
-
Jens Axboe authored
-
Jens Axboe authored
This reverts commit c8d2e937. We run into merging problems with the SCSI tree, revert this one so it can be handled by a postmerge tree there. Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
- 20 Dec, 2010 2 commits
-
-
Jens Axboe authored
-
Jens Axboe authored
Commit a8adbe37 forgot to remove the return variable, kill it. drivers/block/loop.c: In function 'lo_splice_actor': drivers/block/loop.c:398: warning: unused variable 'ret' [...] fs/nfsd/vfs.c: In function 'nfsd_splice_actor': fs/nfsd/vfs.c:848: warning: unused variable 'ret' Reported-by:
Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
- 17 Dec, 2010 5 commits
-
-
Jens Axboe authored
-
Yang Zhang authored
The major/minor device numbers are always defined and used as `unsigned'. Signed-off-by:
Yang Zhang <kthreadd@gmail.com> Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
Yang Zhang authored
Signed-off-by:
Yang Zhang <kthreadd@gmail.com> Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
Gui Jianfeng authored
When cfq_choose_cfqg() is called in select_queue(), there must be at least one backlogged CFQ queue waiting for dispatching, hence there must be at least one backlogged CFQ group on service tree. So we never call choose_service_tree() with cfqg == NULL. Signed-off-by:
Gui Jianfeng <guijianfeng@cn.fujitsu.com> Reviewed-by:
Jeff Moyer <jmoyer@redhat.com> Acked-by:
Vivek Goyal <vgoyal@redhat.com> Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
Michał Mirosław authored
This patch pulls calls to buf->ops->confirm() from all actors passed (also indirectly) to splice_from_pipe_feed(). Is avoiding the call to buf->ops->confirm() while splice()ing to /dev/null is an intentional optimization? No other user does that and this will remove this special case. Against current linux.git 6313e3c2. Signed-off-by:
Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
- 16 Dec, 2010 12 commits
-
-
Jens Axboe authored
-
Jens Axboe authored
It's used by sr, so we need to export it. Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
Jens Axboe authored
-
Jens Axboe authored
-
Tejun Heo authored
Replace sd_media_change() with sd_check_events(). sd used to set the changed state whenever the device is not ready, which can cause event loop while the device is not ready. Media presence handling code is changed such that the changed state is set iff the media presence actually changes. UA still always sets the changed state and NOT_READY always (at least where it used to set ->changed) clears media presence, so no event is lost. Signed-off-by:
Tejun Heo <tj@kernel.org> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
Tejun Heo authored
Replace sr_media_change() with sr_check_events(). It normally only uses GET_EVENT_STATUS_NOTIFICATION to check both media change and eject request. If @clearing includes DISK_EVENT_MEDIA_CHANGE, it issues TUR and compares whether media presence has changed. The SCSI specific media change uevent is kept for compatibility. sr_media_change() was doing both media change check and revalidation. The revalidation part is split into sr_block_revalidate_disk(). Signed-off-by:
Tejun Heo <tj@kernel.org> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
Tejun Heo authored
The usage of TUR has been confusing involving several different commits updating different parts over time. Currently, the only differences between scsi_test_unit_ready() and sr_test_unit_ready() are, * scsi_test_unit_ready() also sets sdev->changed on NOT_READY. * scsi_test_unit_ready() returns 0 if TUR ended with UNIT_ATTENTION or NOT_READY. Due to the above two differences, sr is using its own sr_test_unit_ready(), but sd - the sole user of the above extra handling - doesn't even need them. Where scsi_test_unit_ready() is used in sd_media_changed(), the code is looking for device ready w/ media present state which is true iff TUR succeeds w/o sense data or UA, and when the device is not ready for whatever reason sd_media_changed() explicitly marks media as missing so there's no reason to set sdev->changed automatically from scsi_test_unit_ready() on NOT_READY. Drop both special handlings from scsi_test_unit_ready(), which makes it equivalant to sr_test_unit_ready(), and replace sr_test_unit_ready() with scsi_test_unit_ready(). Also, drop the unnecessary explicit NOT_READY check from sd_media_changed(). Checking return value is enough for testing device readiness. Signed-off-by:
Tejun Heo <tj@kernel.org> Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
Tejun Heo authored
sr_test_unit_ready() returns 0 iff TUR succeeded - IOW, when media is present and the device is actually ready, so the return value wouldn't be zero when TUR ends with sense data. sr_media_change() incorrectly tests (retval || (scsi_sense_valid(sshdr)...)) when it tries to test whether TUR failed without sense data or with sense data indicating media-not-present. Fix the test using scsi_status_is_good() and update comments. - Fixed a comment typo spotted by Eike. Signed-off-by:
Tejun Heo <tj@kernel.org> Cc: Rolf Eike Beer <eike-kernel@sf-tec.de> Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
Tejun Heo authored
In principle, cdrom just needs to pass through ->check_events() but CDROM_MEDIA_CHANGED ioctl makes things a bit more complex. Just as with ->media_changed() support, cdrom code needs to buffer the events and serve them to ioctl and vfs as requested. As the code has to deal with both ->check_events() and ->media_changed(), and vfs and ioctl event buffering, this patch adds check_events caching on top of the existing cdi->mc_flags buffering. It may be a good idea to deprecate CDROM_MEDIA_CHANGED ioctl and remove all this mess. Signed-off-by:
Tejun Heo <tj@kernel.org> Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
Tejun Heo authored
Currently, media presence polling for removeable block devices is done from userland. There are several issues with this. * Polling is done by periodically opening the device. For SCSI devices, the command sequence generated by such action involves a few different commands including TEST_UNIT_READY. This behavior, while perfectly legal, is different from Windows which only issues single command, GET_EVENT_STATUS_NOTIFICATION. Unfortunately, some ATAPI devices lock up after being periodically queried such command sequences. * There is no reliable and unintrusive way for a userland program to tell whether the target device is safe for media presence polling. For example, polling for media presence during an on-going burning session can make it fail. The polling program can avoid this by opening the device with O_EXCL but then it risks making a valid exclusive user of the device fail w/ -EBUSY. * Userland polling is unnecessarily heavy and in-kernel implementation is lighter and better coordinated (workqueue, timer slack). This patch implements framework for in-kernel disk event handling, which includes media presence polling. * bdops->check_events() is added, which supercedes ->media_changed(). It should check whether there's any pending event and return if so. Currently, two events are defined - DISK_EVENT_MEDIA_CHANGE and DISK_EVENT_EJECT_REQUEST. ->check_events() is guaranteed not to be called parallelly. * gendisk->events and ->async_events are added. These should be initialized by block driver before passing the device to add_disk(). The former contains the mask of all supported events and the latter the mask of all events which the device can report without polling. /sys/block/*/events[_async] export these to userland. * Kernel parameter block.events_dfl_poll_msecs controls the system polling interval (default is 0 which means disable) and /sys/block/*/events_poll_msecs control polling intervals for individual devices (default is -1 meaning use system setting). Note that if a device can report all supported events asynchronously and its polling interval isn't explicitly set, the device won't be polled regardless of the system polling interval. * If a device is opened exclusively with write access, event checking is automatically disabled until all write exclusive accesses are released. * There are event 'clearing' events. For example, both of currently defined events are cleared after the device has been successfully opened. This information is passed to ->check_events() callback using @clearing argument as a hint. * Event checking is always performed from system_nrt_wq and timer slack is set to 25% for polling. * Nothing changes for drivers which implement ->media_changed() but not ->check_events(). Going forward, all drivers will be converted to ->check_events() and ->media_change() will be dropped. Signed-off-by:
Tejun Heo <tj@kernel.org> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Jan Kara <jack@suse.cz> Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
Tejun Heo authored
There's no reason for register_disk() and del_gendisk() to be in fs/partitions/check.c. Move both to genhd.c. While at it, collapse unlink_gendisk(), which was artificially in a separate function due to genhd.c / check.c split, into del_gendisk(). Signed-off-by:
Tejun Heo <tj@kernel.org> Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
Tejun Heo authored
There's no user of the facility. Kill it. Signed-off-by:
Tejun Heo <tj@kernel.org> Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
- 13 Dec, 2010 1 commit
-
-
Shaohua Li writes authored
If priority is changed, continuing to check workload_expires and service tree count of the previous workload does not make sense. We should always choose the workload with lowest key of new priority in such case. Signed-off-by:
Shaohua Li <shaohua.li@intel.com> Reviewed-by:
Jeff Moyer <jmoyer@redhat.com> Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
- 30 Nov, 2010 2 commits
-
-
Gui Jianfeng authored
It's able to check whether a CFQ group on a service tree by checking "cfqg->rb_node". There's no need to maintain an extra flag here. Signed-off-by:
Gui Jianfeng <guijianfeng@cn.fujitsu.com> Acked-by:
Vivek Goyal <vgoyal@redhat.com> Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
Gui Jianfeng authored
When a cfq group is running, it won't be dequeued from service tree, so there's no need to store the active one in st->active. Just gid rid of it. Signed-off-by:
Gui Jianfeng <guijianfeng@cn.fujitsu.com> Acked-by:
Vivek Goyal <vgoyal@redhat.com> Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
- 27 Nov, 2010 1 commit
-
-
Jens Axboe authored
Merge branch 'cleanup-bd_claim' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc into for-2.6.38/core
-
- 16 Nov, 2010 4 commits
-
-
Mike Snitzer authored
Signed-off-by:
Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by:
Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by:
Mike Snitzer <snitzer@redhat.com> Signed-off-by:
Jens Axboe <jaxboe@fusionio.com>
-
Jens Axboe authored
-
Jens Axboe authored
-
Linus Torvalds authored
-
- 15 Nov, 2010 11 commits
-
-
Eric Paris authored
The addition of CONFIG_SECURITY_DMESG_RESTRICT resulted in a build failure when CONFIG_PRINTK=n. This is because the capabilities code which used the new option was built even though the variable in question didn't exist. The patch here fixes this by moving the capabilities checks out of the LSM and into the caller. All (known) LSMs should have been calling the capabilities hook already so it actually makes the code organization better to eliminate the hook altogether. Signed-off-by:
Eric Paris <eparis@redhat.com> Acked-by:
James Morris <jmorris@namei.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
Linus Torvalds authored
Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 * 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: arm: omap1: devices: need to return with a value OMAP1: camera.h: add missing include omap: dma: Add read-back to DMA interrupt handler to avoid spuriousinterrupts OMAP2: Devkit8000: Fix mmc regulator failure
-
git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/stagingLinus Torvalds authored
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: hwmon: (w83795) Check for BEEP pin availability hwmon: (w83795) Clear intrusion alarm immediately hwmon: (w83795) Read the intrusion state properly hwmon: (w83795) Print the actual temperature channels as sources hwmon: (w83795) List all usable temperature sources hwmon: (w83795) Expose fan control method hwmon: (w83795) Fix fan control mode attributes hwmon: (lm95241) Check validity of input values hwmon: Change mail address of Hans J. Koch
-
git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/stagingLinus Torvalds authored
* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: i2c: Sanity checks on adapter registration i2c: Mark i2c_adapter.id as deprecated i2c: Drivers shouldn't include <linux/i2c-id.h> i2c: Delete unused adapter IDs i2c: Remove obsolete cleanup for clientdata
-
git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6Linus Torvalds authored
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: PCI: sysfs: fix printk warnings PCI: fix pci_bus_alloc_resource() hang, prefer positive decode PCI: read current power state at enable time PCI: fix size checks for mmap() on /proc/bus/pci files x86/PCI: coalesce overlapping host bridge windows PCI hotplug: ibmphp: Add check to prevent reading beyond mapped area
-
Jean Delvare authored
Make sure I2C adapters being registered have the required struct fields set. If they don't, problems will happen later. Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
Jean Delvare authored
It's about time to make it clear that i2c_adapter.id is deprecated. Hopefully this will remind the last user to move over to a different strategy. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Acked-by:
Jarod Wilson <jarod@redhat.com> Acked-by:
Mauro Carvalho Chehab <mchehab@redhat.com> Acked-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Jean Delvare authored
Drivers don't need to include <linux/i2c-id.h>, especially not when they don't use anything that header file provides. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Cc: Michael Hunold <michael@mihu.de> Acked-by:
Mauro Carvalho Chehab <mchehab@redhat.com>
-
Jean Delvare authored
Delete unused I2C adapter IDs. Special cases are: * I2C_HW_B_RIVA was still set in driver rivafb, however no other driver is ever looking for this value, so we can safely remove it. * I2C_HW_B_HDPVR is used in staging driver lirc_zilog, however no adapter ID is ever set to this value, so the code in question never runs. As the code additionally expects that I2C_HW_B_HDPVR may not be defined, we can delete it now and let the lirc_zilog driver maintainer rewrite this piece of code. Big thanks for Hans Verkuil for doing all the hard work :) Signed-off-by:
Jean Delvare <khali@linux-fr.org> Acked-by:
Jarod Wilson <jarod@redhat.com> Acked-by:
Mauro Carvalho Chehab <mchehab@redhat.com> Acked-by:
Hans Verkuil <hverkuil@xs4all.nl>
-
Wolfram Sang authored
A few new i2c-drivers came into the kernel which clear the clientdata-pointer on exit. This is obsolete meanwhile, so fix it and hope the word will spread. Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de> Acked-by:
Alan Cox <alan@linux.intel.com> Acked-by:
Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by:
Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by:
Jean Delvare <khali@linux-fr.org>
-
Linus Torvalds authored
Move the logging bits from kernel.h into printk.h so that there is a bit more logical separation of the generic from the printk logging specific parts. Signed-off-by:
Joe Perches <joe@perches.com> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-