lkml.org 
[lkml]   [2008]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] scsi: revert "[SCSI] Get rid of scsi_cmnd->done"


On Sun, 6 Jan 2008, Linus Torvalds wrote:
>
> That said:
>
> > pktcdvd shouldn't be mucking with the size of the underlying CD/DVD ...
>
> I'm not sure if it should be mucking with the size or not, but it
> definitely shouldn't be mucking with the block-size, because that can
> indeed cause huge problems.

Hmm. Looking closer, it's probably ok in that case, because it does do a
"bd_claim()" to make sure that it has exclusive access, so while there may
be other openers around, at least those other openers won't be filesystem
mounts or anything that opened with O_EXCL.

So changing the blocksize is probably ok in this case.

That still leaves the question whether pktcdvd *should* muck with the base
device at all, and I'm not at all sure about that. But I'm no longer sure
that the pktcdvd code is necessarily *clearly* broken, now it's more of a
"should it really do that?" thing.

So I still suspect that this:

> - set_capacity(pd->disk, lba << 2);
> - set_capacity(pd->bdev->bd_disk, lba << 2);
> - bd_set_size(pd->bdev, (loff_t)lba << 11);
> + set_capacity(pd->disk, get_capacity(pd->bdev->bd_disk));

is likely a good thing to do (in conjunction with my patch that made
i_size be "reliable" after an open), but there may be some reason why
pktcdvd really wants to control the size rather than be on the receiving
end of the size.

Peter, this is your decision. Apparently my one-liner fixes the immediate
bug (but it's not really a regression either - I think the i_size issue
has been there since pretty much day #1), and what pktcdvd does is
somewhat less critical an issue?

Linus


\
 
 \ /
  Last update: 2008-01-06 19:47    [W:0.112 / U:1.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site