From: Pat LaVarre <p.lavarre@ieee.org>
To: Ben Fennema <bfennema@falcon.csc.calpoly.edu>
Cc: linux-scsi@vger.kernel.org, linux_udf@hpesjro.fc.hp.com,
Jens Axboe <axboe@suse.de>
Subject: [PATCH] udf_get_last_block decrement redundant maybe
Date: 27 Jul 2004 14:44:47 -0600 [thread overview]
Message-ID: <1090961087.4812.59.camel@patibmrh9> (raw)
Ben F:
Please dis/agree the following is a small correction. I ask because,
I see ioctl CDROM_LAST_WRITTEN dynamically calls cdrom_get_last_written
of drivers/cdrom/cdrom.c.
I see cdrom_get_last_written gets its idea of max LBA from such places
as the ti.last_rec_address, which is an LBA written, not the LBA beyond,
i.e. is already the count of blocks written minus one, with no further
decrement required.
I see removing the udf_get_last_block decrement lets udf_find_anchor(sb)
work with an "AVDPs at N-256, N" UDF disc if only I also insert,
beforehand:
UDF_SB_LASTBLOCK(sb) = udf_get_last_block(sb);
Pat LaVarre
diff -urp -U 4 linux-2.6.8-rc2-bk2/fs/udf/lowlevel.c linux-2.6.8-rc2-bk5-pel/fs/udf/lowlevel.c
--- linux-2.6.8-rc2-bk2/fs/udf/lowlevel.c 2004-06-15 23:19:36.000000000 -0600
+++ linux-2.6.8-rc2-bk5-pel/fs/udf/lowlevel.c 2004-07-27 13:39:01.876811232 -0600
@@ -76,8 +76,8 @@ udf_get_last_block(struct super_block *s
if (ioctl_by_bdev(bdev, CDROM_LAST_WRITTEN, (unsigned long) &lblock))
lblock = bdev->bd_inode->i_size >> sb->s_blocksize_bits;
if (lblock)
- return lblock - 1;
+ return lblock;
else
return 0;
}
reply other threads:[~2004-07-27 20:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1090961087.4812.59.camel@patibmrh9 \
--to=p.lavarre@ieee.org \
--cc=axboe@suse.de \
--cc=bfennema@falcon.csc.calpoly.edu \
--cc=linux-scsi@vger.kernel.org \
--cc=linux_udf@hpesjro.fc.hp.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