lkml.org 
[lkml]   [2010]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] RDMA/cxgb4: Add default_llseek to debugfs files.
Date
On Wednesday 29 September 2010 19:19:32 Roland Dreier wrote:
> > @@ -182,6 +182,7 @@ static const struct file_operations qp_debugfs_fops = {
> > .open = qp_open,
> > .release = qp_release,
> > .read = debugfs_read,
> > + .llseek = default_llseek,
> > };
>
> I think this could actually be generic_file_llseek (right, Arnd?).

The main difference between default_llseek and generic_file_llseek
is that default_llseek doesn't care about the maximum file size
of the underlying file system, which is ULONG_MAX on debugfs,
so they are equivalent.

In general, the preferred one is no_llseek for those files where
you know you do not need to seek. If you do, I'd use default_llseek
for character devices and generic_file_llseek for file systems
that set the s_maxbytes.

Arnd


\
 
 \ /
  Last update: 2010-09-30 00:39    [W:0.051 / U:12.012 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site