lkml.org 
[lkml]   [2013]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] f_pos in readdir() (was Re: [RFC][PATCH] vfs: always protect diretory file->fpos with inode mutex)
> As for ->readdir(), I'd like to resurrect an old proposal to change the ABI
> of that sucker. Quoting the thread from 4 years ago:

I'd love to see the readdir() interface cleaned up, yes please.

> Comments?

Hmm. Do we want to think about letting callers copy the name to
userspace in fragments?

I was looking at current readdir paths and saw that btrfs has an
annoying wrinkle that its directory entries might be in large blocks
that span disjoint pages. So it copies them to a kmalloced()ed buffer
to pass to filldir().

Maybe it wouldn't be worth having to track incomplete entries in the
core, but it'd be nice to get rid of this copy in btrfs.

(btrfs could also be more clever and only do this dance when the name
really does span pages.. it's very rare. :/).

- z


\
 
 \ /
  Last update: 2013-02-25 20:02    [W:0.124 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site