<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/cdrom, branch v2.6.39</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.39</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.39'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2011-04-29T08:17:25Z</updated>
<entry>
<title>cdrom: always check_disk_change() on open</title>
<updated>2011-04-29T08:17:25Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2011-04-29T08:15:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bf2253a6f00e8fea5b026e471e9f0d0a1b3621f2'/>
<id>urn:sha1:bf2253a6f00e8fea5b026e471e9f0d0a1b3621f2</id>
<content type='text'>
cdrom_open() called check_disk_change() after the rest of open path
succeeded which leads to the following bizarre behavior.

* After media change, if the device opened without O_NONBLOCK,
  open_for_data() naturally fails with -ENOMEDIA and
  check_disk_change() is never called.  The media is known to be gone
  and the open failure makes it obvious to the userland but device
  invalidation never happens.

* But if the device is opened with O_NONBLOCK, all the checks are
  bypassed and cdrom_open() doesn't notice that the media is not there
  and check_disk_change() is called and invalidation happens.

There's nothing to be gained by avoiding calling check_disk_change()
on open failure.  Common cases end up calling check_disk_change()
anyway.  All we get is inconsistent behavior.

Fix it by moving check_disk_change() invocation to the top of
cdrom_open() so that it always gets called regardless of how the rest
of open proceeds.

Stable: 2.6.38

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Amit Shah &lt;amit.shah@redhat.com&gt;
Tested-by: Amit Shah &lt;amit.shah@redhat.com&gt;
Cc: stable@kernel.org
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>block: unexport DISK_EVENT_MEDIA_CHANGE for legacy/fringe drivers</title>
<updated>2011-04-21T19:33:05Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2011-04-21T19:32:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9fd097b14918875bd6f125ed699d7bbbba5893ee'/>
<id>urn:sha1:9fd097b14918875bd6f125ed699d7bbbba5893ee</id>
<content type='text'>
In-kernel disk event polling doesn't matter for legacy/fringe drivers
and may lead to infinite event loop if -&gt;check_events() implementation
generates events on level condition instead of edge.

Now that block layer supports suppressing exporting unlisted events,
simply leaving disk-&gt;events cleared allows these drivers to keep the
internal revalidation behavior intact while avoiding weird
interactions with userland event handler.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>Fix common misspellings</title>
<updated>2011-03-31T14:26:23Z</updated>
<author>
<name>Lucas De Marchi</name>
<email>lucas.demarchi@profusion.mobi</email>
</author>
<published>2011-03-31T01:57:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=25985edcedea6396277003854657b5f3cb31a628'/>
<id>urn:sha1:25985edcedea6396277003854657b5f3cb31a628</id>
<content type='text'>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</content>
</entry>
<entry>
<title>gdrom,viocd: Convert to bdops-&gt;check_events()</title>
<updated>2011-03-09T18:54:28Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2011-03-09T18:54:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1c27030bd21e7e2c68ef5be9f28c63778cf4b27f'/>
<id>urn:sha1:1c27030bd21e7e2c68ef5be9f28c63778cf4b27f</id>
<content type='text'>
Convert gdrom and viocd from -&gt;media_changed() to -&gt;check_events().

It's unclear how the conditions are cleared and it's possible that it
may generate spurious events when polled.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
</content>
</entry>
<entry>
<title>cdrom: support devices that have check_events but not media_changed</title>
<updated>2011-02-09T13:22:37Z</updated>
<author>
<name>Simon Arlott</name>
<email>simon@fire.lp0.eu</email>
</author>
<published>2011-02-09T13:21:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b8cf0e0e552ca48e9a00f518aeb4f5e03984022b'/>
<id>urn:sha1:b8cf0e0e552ca48e9a00f518aeb4f5e03984022b</id>
<content type='text'>
Commit 93aae17af1172c40c6f74b7294e93a90c3cfaa5d ("sr: implement
sr_check_events()") replaced the media_changed op with the
check_events op in drivers/scsi/sr.c

All users that check for the CDC_MEDIA_CHANGED capbility try both
the check_events op and the media_changed op, but register_cdrom()
was requiring media_changed.

This patch fixes the capability checking.

The cdrom_select_disc ioctl is also using the two operations, so
they should be required for CDC_SELECT_DISC too.

Signed-off-by: Simon Arlott &lt;simon@fire.lp0.eu&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Tested-by: Chris Clayton &lt;chris2553@googlemail.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block</title>
<updated>2011-01-13T18:45:01Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-01-13T18:45:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=275220f0fcff1adf28a717076e00f575edf05fda'/>
<id>urn:sha1:275220f0fcff1adf28a717076e00f575edf05fda</id>
<content type='text'>
* 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block: (43 commits)
  block: ensure that completion error gets properly traced
  blktrace: add missing probe argument to block_bio_complete
  block cfq: don't use atomic_t for cfq_group
  block cfq: don't use atomic_t for cfq_queue
  block: trace event block fix unassigned field
  block: add internal hd part table references
  block: fix accounting bug on cross partition merges
  kref: add kref_test_and_get
  bio-integrity: mark kintegrityd_wq highpri and CPU intensive
  block: make kblockd_workqueue smarter
  Revert "sd: implement sd_check_events()"
  block: Clean up exit_io_context() source code.
  Fix compile warnings due to missing removal of a 'ret' variable
  fs/block: type signature of major_to_index(int) to major_to_index(unsigned)
  block: convert !IS_ERR(p) &amp;&amp; p to !IS_ERR_NOR_NULL(p)
  cfq-iosched: don't check cfqg in choose_service_tree()
  fs/splice: Pull buf-&gt;ops-&gt;confirm() from splice_from_pipe actors
  cdrom: export cdrom_check_events()
  sd: implement sd_check_events()
  sr: implement sr_check_events()
  ...
</content>
</entry>
<entry>
<title>gdrom: don't use flush_scheduled_work()</title>
<updated>2010-12-24T14:59:06Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-12-24T14:59:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0ead5c86ac4c9903da93c76716135bc29d9cd83b'/>
<id>urn:sha1:0ead5c86ac4c9903da93c76716135bc29d9cd83b</id>
<content type='text'>
flush_scheduled_work() is deprecated and scheduled to be removed.
Directly flush work on removal instead.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>cdrom: export cdrom_check_events()</title>
<updated>2010-12-16T16:58:50Z</updated>
<author>
<name>Jens Axboe</name>
<email>jaxboe@fusionio.com</email>
</author>
<published>2010-12-16T16:58:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=30a7caabbb8e8702b9cf453fee83f773d8b3430d'/>
<id>urn:sha1:30a7caabbb8e8702b9cf453fee83f773d8b3430d</id>
<content type='text'>
It's used by sr, so we need to export it.

Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>cdrom: add -&gt;check_events() support</title>
<updated>2010-12-16T16:53:38Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-12-08T19:57:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2d9217296bfa6fdc0d3707264076e5296faffdbd'/>
<id>urn:sha1:2d9217296bfa6fdc0d3707264076e5296faffdbd</id>
<content type='text'>
In principle, cdrom just needs to pass through -&gt;check_events() but
CDROM_MEDIA_CHANGED ioctl makes things a bit more complex.  Just as
with -&gt;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 -&gt;check_events() and
-&gt;media_changed(), and vfs and ioctl event buffering, this patch adds
check_events caching on top of the existing cdi-&gt;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 &lt;tj@kernel.org&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>cdrom: gdrom: ctrl_in/outX to __raw_read/writeX conversion.</title>
<updated>2010-10-27T05:33:39Z</updated>
<author>
<name>Paul Mundt</name>
<email>lethal@linux-sh.org</email>
</author>
<published>2010-10-27T05:33:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9eb79bb3f54ce1843d579ef42ded61e0c607e850'/>
<id>urn:sha1:9eb79bb3f54ce1843d579ef42ded61e0c607e850</id>
<content type='text'>
The ctrl_xxx routines are deprecated, switch over to the __raw_xxx
versions.

Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
</feed>
