lkml.org 
[lkml]   [2013]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 1/4] spinlock: A new lockref structure for lockless update of refcount
On Sat, Aug 31, 2013 at 03:49:31PM -0700, Linus Torvalds wrote:
> On Sat, Aug 31, 2013 at 2:23 PM, Al Viro <viro@zeniv.linux.org.uk> wrote:
> >
> > Hmm... OK, most of these suckers are actually doing just one component;
> > we can look into 'print the ancestors as well' later, but the minimal
> > variant would be something like this and it already covers a lot of those
> > guys. Comments?
>
> Doesn't look wrong, but remember the /proc debugging thing? We
> definitely wanted more than just one pathname component, and I don't
> think that's completely rare.
>
> So I think it would be better to prepare for that, and simply print to
> a local buffer, and then use the "string()" function on the end
> result. Rather than do it directly from the dentry like you do, and
> then having to do that widen() thing because you couldn't do the
> strnlen() that that code wanted..

Actually, right now I'm debugging a variant that avoids local buffers; use
is %pD3 for grandparent/parent/name, etc., up to %pD4. %pd is equivalent
to %pD1 (just the dentry name). Keep in mind that things like NFS use
a _lot_ of what would be %pD2 in debugging printks and the string can grow
fairly long, so I'd rather live with widen() than mess with local buffers
here. I'll send an updated variant when I'm more or less satisfied with
it...


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