All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Osterlund <petero2@telia.com>
To: Phillip Susi <psusi@cfl.rr.com>
Cc: linux kernel <linux-kernel@vger.kernel.org>, axboe@suse.de
Subject: Re: [PATCH] pktcdvd & udf bugfixes
Date: 14 Jan 2006 15:08:12 +0100	[thread overview]
Message-ID: <m3oe2e2983.fsf@telia.com> (raw)
In-Reply-To: <43C5D71B.1060002@cfl.rr.com>

Phillip Susi <psusi@cfl.rr.com> writes:

> Attached is a patch to fix a few bugs in the pktcdvd driver and udf
> filesystem.  Ben Collins said I should post it to the list and cc Jens
> Axboe as he works on this area.  The patch is rather short, but fixes
> the following bugs:
> 
> 1) The pktcdvd driver was using an 8 bit field to store the packet
> length obtained from the disc track info.  This causes it to overflow
> packet length values of 128 sectors or more.  I changed the field to
> 32 bits to fix this.

The variable is unsigned, so it supports values up to 255, ie no need
to change it.

> 2) The pktcdvd driver defaulted to it's maximum allowed packet length
> when it detected a 0 in the track info field.  I changed this to fail
> the operation and refuse to access the media.  This seems more sane
> than attempting to access it with a value that almost certainly will
> not work.

That code is very old, I think Jens wrote it. I assume it wasn't just
for fun, but to be able to support drives with slightly
broken/non-standard firmware.

> 3) The pktcdvd driver uses a compile time macro constant to define the
> maximum supported packet length.  I changed this from 32 sectors to
> 128 sectors because that allows over 100 MB of additional usable space
> on a 700 MB cdrw, and increases throughput.

The current limit is 32 disc blocks, ie 64KB or 128 "linux sectors".

How do you make the packet size larger for a CDRW disc? Just changing
the constant is not going to help unless you can also format a disc
with larger packets.

> At some point I hope to find the time to refactor pktcdvd to properly
> allocate buffers of the length specified on the disc rather than the
> compile time maximum, but that will be a larger change and require
> more testing.

Might be a good idea. On DVD discs the block size is only 32KB, so
half of the allocated memory is unused.

-- 
Peter Osterlund - petero2@telia.com
http://web.telia.com/~u89404340

  parent reply	other threads:[~2006-01-14 14:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-12  4:12 [PATCH] pktcdvd & udf bugfixes Phillip Susi
2006-01-12  9:02 ` Pekka Enberg
2006-01-14 14:08 ` Peter Osterlund [this message]
2006-01-14 18:35   ` Phillip Susi
2006-01-14 21:45     ` Peter Osterlund
2006-01-14 23:01       ` Phillip Susi
2006-01-15 17:24         ` Peter Osterlund
2006-01-15 17:43           ` Phillip Susi
2006-01-15 17:56             ` Peter Osterlund
2006-01-15 22:27               ` Phillip Susi
2006-01-15 23:03                 ` Peter Osterlund
2006-01-15 22:48           ` Peter Osterlund
2006-01-16  3:01             ` Phillip Susi
2006-01-16  6:49               ` Peter Osterlund
2006-01-19 20:46                 ` Phillip Susi

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=m3oe2e2983.fsf@telia.com \
    --to=petero2@telia.com \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=psusi@cfl.rr.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.