Re: [PATCH] sr: Ensure disk is revalidated when media changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Fri, Apr 08, 2011 at 12:37:56PM +0100, Stefan Hajnoczi wrote:
> There is a related issue I have been discussing with Amit:
> https://lkml.org/lkml/2011/3/23/156
> 
> On media change the inode size is not updated by the sr driver or the
> universal cdrom driver.  A userspace process that holds a /dev/sr0
> file descriptor open across media change causes all processes on the
> system to see the old medium size when they do lseek(fd, 0, SEEK_END).
> 
> I think it would make sense to refresh the inode size on media change
> so that even open file descriptors see the new size and a single
> process cannot force a stale value for all other userspace processes
> on the system.

Hmmm... I don't know.  Maybe we can but I'm not sure whether there's a
good reason for it.  cdrom is locked while opened after all.  Are
there actual problems?

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux