Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1311271

[PATCH 3.2 69/70] cdrom: Random writing support for BD-RE media

Path csiph.com!feeder.erje.net!2.eu.feeder.erje.net!newsfeed.datemas.de!weretis.net!feeder4.news.weretis.net!storethat.news.telefonica.de!telefonica.de!news.panservice.it!bofh.it!news.nic.it!robomod
From Ben Hutchings <ben@decadent.org.uk>
Newsgroups linux.kernel
Subject [PATCH 3.2 69/70] cdrom: Random writing support for BD-RE media
Date Mon, 18 Jan 2016 04:40:03 +0100
Message-ID <qS8PF-3ml-29@gated-at.bofh.it> (permalink)
References <qS8FX-3hu-3@gated-at.bofh.it>
X-Original-To linux-kernel@vger.kernel.org, stable@vger.kernel.org
Content-Type text/plain; charset="UTF-8"
Content-Disposition inline
Content-Transfer-Encoding 8bit
MIME-Version 1.0
X-Mailer LinuxStableQueue (scripts by bwh)
X-Sa-Exim-Connect-IP 192.168.4.247
X-Sa-Exim-Mail-From ben@decadent.org.uk
X-Sa-Exim-Scanned No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 43
Organization linux.* mail to news gateway
X-Original-Cc akpm@linux-foundation.org, "Jens Axboe" <axboe@fb.com>, "Georgios Toptsidis" <gtoptsid@gmail.com>
X-Original-Date Mon, 18 Jan 2016 03:18:35 +0000
X-Original-Message-ID <lsq.1453087115.868892992@decadent.org.uk>
X-Original-References <lsq.1453087114.713093519@decadent.org.uk>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1311271

Show key headers only | View raw


3.2.76-rc1 review patch.  If anyone has any objections, please let me know.

------------------

From: Georgios Toptsidis <gtoptsid@gmail.com>

commit f7e7868b4743f1cc5e59e6e0ddd3ccf9cfe53a1b upstream.

Recently, i bought a blu-ray writer and noticed that while cdrecord
worked perfectly, random writing didn't work on rewritable bd-re media.
For example, dd if=/dev/zero of=/dev/sr0 bs=32768 count=2 gave the usual
"read-only file system" message.

After checking if the problem lies with my burner or firmware, i grep-ed
the kernel source for EROFS. One of the results was in the cdrom driver.

I tried to follow the function chain and ended in the cdrom_is_dvd_rw
function where writing is permitted only for DVD-RAM and DVD+RW media.
I added a new case label for 0x43 which is the profile name of BD-RE
and now it works correctly for BD-RE too.

Maybe there is a better way of implementing this, like a new function
checking for blu-ray support and called from cdrom_open_write like
it happens for mrw and dvdram media, but adding the case label worked.

Thank you for your time.

Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/cdrom/cdrom.c | 1 +
 1 file changed, 1 insertion(+)

--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -873,6 +873,7 @@ static int cdrom_is_dvd_rw(struct cdrom_
 	switch (cdi->mmc3_profile) {
 	case 0x12:	/* DVD-RAM	*/
 	case 0x1A:	/* DVD+RW	*/
+	case 0x43:	/* BD-RE	*/
 		return 0;
 	default:
 		return 1;

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 3.2 69/70] cdrom: Random writing support for BD-RE media Ben Hutchings <ben@decadent.org.uk> - 2016-01-18 04:40 +0100

csiph-web