From: Tejun Heo <tj@kernel.org>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Amit Shah <amit.shah@redhat.com>,
linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
"James E.J. Bottomley" <James.Bottomley@suse.de>,
linux-scsi@vger.kernel.org, Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH] sr: Ensure disk is revalidated when media changes
Date: Fri, 8 Apr 2011 09:20:41 -0700 [thread overview]
Message-ID: <20110408162041.GB3871@mtj.dyndns.org> (raw)
In-Reply-To: <BANLkTinpRJHr+293kPzS1=hCWRPamOOGfw@mail.gmail.com>
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
next prev parent reply other threads:[~2011-04-08 16:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-31 18:20 Amit Shah
2011-04-01 15:43 ` Tejun Heo
2011-04-05 6:51 ` Amit Shah
2011-04-06 10:06 ` Tejun Heo
2011-04-06 11:02 ` Amit Shah
2011-04-08 11:37 ` Stefan Hajnoczi
2011-04-08 16:20 ` Tejun Heo [this message]
2011-04-08 16:43 ` Stefan Hajnoczi
2011-04-08 16:52 ` Tejun Heo
2011-04-12 4:51 ` Amit Shah
2011-04-12 8:16 ` Stefan Hajnoczi
2011-04-12 8:36 ` Amit Shah
2011-04-05 14:46 ` Amit Shah
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=20110408162041.GB3871@mtj.dyndns.org \
--to=tj@kernel.org \
--cc=James.Bottomley@suse.de \
--cc=amit.shah@redhat.com \
--cc=armbru@redhat.com \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=stefanha@gmail.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®