mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@suse.cz>
To: Peter Osterlund <petero2@telia.com>
Cc: Jens Axboe <axboe@suse.de>,
	packet-writing <packet-writing@suse.com>,
	linux-kernel@vger.kernel.org
Subject: Re: ext2 on a CD-RW
Date: Sat, 3 Jan 2004 20:14:14 +0100	[thread overview]
Message-ID: <20040103191414.GE1080@elf.ucw.cz> (raw)
In-Reply-To: <Pine.LNX.4.44.0401020022060.2407-100000@telia.com>

Hi!

> > > > I thought some people here might find this amusing. After I
> > > > quick-formatted a CD-RW with cdrwtool today I then did the
> > > > following:
> > > > 
> > > > mke2fs -b 2048 /dev/pktcdvd0
> > > > 
> > > > It appears to work OK and I'm compiling a kernel on it as I type
> > > > this. pktcdvd can't handle this properly unless the '-b 2048' is
> > > > given for a pretty obvious reason. df tells me that the capacity of
> > > > a disc formatted like this is 530MB so there is a few MB lost
> > > > compared to UDF. I'm pretty sure this is a follish thing to do so
> > > > would anyone care to give me some technical reasons why? :)
> > > 
> > > Yes, I have tested this too. It works in 2.4 but not in 2.5. In 2.5
> > > sr.c complains about unaligned transfers when I try to mount the
> > > filesystem. 2.4 has code (sr_scatter_pad) to handle unaligned
> > > transfers, but that code was removed in 2.5, and I havn't yet
> > > investigated how it is supposed to work without that code.
> > 
> > There's supposed to be a reblocking player in the middle, ala loop. This
> > doesn't really work well for pktcdvd of course, so I'd suggest writing a
> > helper for reading and writing sub-block size units.
> 
> I finally decided to investigate why this didn't work in the 2.5/2.6 code.
> (My tests were made with the 2.6.1-rc1 code and the latest packet patch.)
> There are two problems. The first is that the packet writing code forgot
> to set the hardsect size. This is fixed by the following patch.
> 
> --- linux/drivers/block/pktcdvd.c.old	2004-01-02 00:23:57.000000000 +0100
> +++ linux/drivers/block/pktcdvd.c	2004-01-02 00:24:01.000000000 +0100
> @@ -2164,6 +2164,7 @@
>  	request_queue_t *q = disks[pkt_get_minor(pd)]->queue;
>  
>  	blk_queue_make_request(q, pkt_make_request);
> +	blk_queue_hardsect_size(q, CD_FRAMESIZE);
>  	blk_queue_max_sectors(q, PACKET_MAX_SECTORS);
>  	blk_queue_merge_bvec(q, pkt_merge_bvec);
>  	q->queuedata = pd;
> 

Where do I get this file? It does not appear to be in 2.6.0.

[I have few partly-bad cd-rws, and putting ext2 on them would be
"cool" :-)]

							Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

  parent reply	other threads:[~2004-01-03 19:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-01 23:47 Peter Osterlund
2004-01-02  0:24 ` Andrew Morton
2004-01-02  1:30   ` Peter Osterlund
2004-01-02  9:06     ` Arjan van de Ven
2004-01-02 10:09       ` Jens Axboe
2004-01-02 10:51       ` Peter Osterlund
2004-01-02 10:59         ` Jens Axboe
2004-01-02 12:09           ` Peter Osterlund
2004-01-02 12:19             ` Jens Axboe
2004-01-02 13:38               ` Peter Osterlund
2004-01-02 13:59                 ` Jens Axboe
2004-01-02 16:12           ` Peter Osterlund
2004-03-29 15:38           ` Peter Osterlund
2004-01-02 10:08     ` Jens Axboe
2004-01-03 19:14 ` Pavel Machek [this message]
2004-01-03 20:32   ` Peter Osterlund

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040103191414.GE1080@elf.ucw.cz \
    --to=pavel@suse.cz \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=packet-writing@suse.com \
    --cc=petero2@telia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®