lkml.org 
[lkml]   [2001]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: optimize DNAME_INLINE_LEN
On Thu, Dec 13, 2001 at 04:07:06PM -0700, Andreas Dilger wrote:
> Alternately (also ugly) you could just define struct dentry the as now,
> but have a fixed size declaration for d_iname, like:
>
> #define DNAME_INLINE_MIN 16
>
> unsigned char d_iname[DNAME_INLINE_MIN];
Using [0] here would also work
and fixing other code to add DNAME_INLINE_MIN as needed. Unfortunately
this "fixing other code" would likely prevent the patch going into 2.4,
which would be bad.

#define d_... has a similar problem => the potential to break previously
compiling source code.

Probably just using an compiler #ifdef is best, and perhaps doing it
cleanly (with using d_iname[0]) on 2.5.


-Andi

P.S.: I originally picked the 16 number and it was totally arbitary, so
an increase on the fallback to 20-30 would be likely ok.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:14    [W:3.348 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site