From: Christoph Hellwig <hch@infradead.org>
To: Arnd Bergmann <arndbergmann@googlemail.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
John Kacur <jkacur@redhat.com>,
linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Alan Cox <alan@lxorguk.ukuu.org.uk>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] sony_pi: Remove the BKL from sonypi_misc_open
Date: Sun, 25 Oct 2009 03:30:27 -0400 [thread overview]
Message-ID: <20091025073027.GA1226@infradead.org> (raw)
In-Reply-To: <200910221550.05524.arnd@arndb.de>
On Thu, Oct 22, 2009 at 03:50:04PM +0200, Arnd Bergmann wrote:
> Is it safe to assume that file_operations without a read() or write()
> method also don't need llseek?
There are two reasons why a driver could need llseek:
(a) it uses the file position somewhere. Normally that's just in
read/write, but I wouldn't be surprised if there are drivers using
the file position somewhere in weird ioctls.
(b) because broken userland assumes they can seek on the file
descriptor. For example some versions of tar expect lseek to work
on tape devices despite them not actually using the file position
anywere.
So the answer to your above questions is: most likely yes, but and audit
for a) should be performed. We can't do much about (b) except for trial
and error. Unless there are very important applications expecting to be
able to seek I think returning the correct error is more important than
having zero change in behaviour.
> Testing for S_IFREG will not work well for debugfs, which is probably
> a large number of the cases that do not want an llseek method.
Yes. S_IFREG should be done last, and probably the real filesystem
should be converted to always have a llseek method before tackling the
mess in the synthetic filesystems.
next prev parent reply other threads:[~2009-10-25 7:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-18 21:54 [PATCH] sony_pi: Remove the BKL from sonypi_misc_open John Kacur
2009-10-19 4:19 ` Arnd Bergmann
2009-10-19 18:20 ` John Kacur
2009-10-19 22:00 ` Arnd Bergmann
2009-10-19 22:08 ` Arnd Bergmann
2009-10-21 0:06 ` John Kacur
2009-10-21 8:29 ` Arnd Bergmann
2009-10-21 10:27 ` John Kacur
2009-10-21 13:16 ` Arnd Bergmann
2009-10-22 2:52 ` Christoph Hellwig
2009-10-21 21:31 ` Frederic Weisbecker
2009-10-21 21:41 ` John Kacur
2009-10-21 21:55 ` Frederic Weisbecker
2009-10-21 22:06 ` John Kacur
2009-10-21 22:27 ` Frederic Weisbecker
2009-10-22 2:55 ` Christoph Hellwig
2009-10-22 13:50 ` Arnd Bergmann
2009-10-25 7:30 ` Christoph Hellwig [this message]
2009-10-19 22:30 ` Mattia Dongili
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=20091025073027.GA1226@infradead.org \
--to=hch@infradead.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arndbergmann@googlemail.com \
--cc=fweisbec@gmail.com \
--cc=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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