Re: 2.6.5-mm1 [PATCH]

From: Andrew Morton (akpm_at_osdl.org)
Date: 04/05/04

  • Next message: Mark Rutherford: "2.6.5 forcedeth sending .. trash? / intel 82540EM dropping packets?"
    Date:	Sun, 4 Apr 2004 23:55:26 -0700
    To: Ray Lee <ray-lk@madrabbit.org>
    
    

    Ray Lee <ray-lk@madrabbit.org> wrote:
    >
    > Could I suggest an alternate version, below? It limits the knowledge of
    > the CONFIG_QUOTA option to the quota header file, and still shrinks the
    > inode by two pointers. The only functional difference between this and
    > Matt Mackall's version is the below will still leave in a call to
    > memset, but with a zero length. On the plus side, it keeps fs/inode.c
    > free of preprocessor noise, which seems worth the trade-off.
    >
    > quota.h | 4 ++++
    > 1 files changed, 4 insertions(+)
    >
    > diff -NurX ../dontdiff linus-2.6/include/linux/quota.h linus-2.6-inode-shrinkage/include/linux/quota.h
    > --- linus-2.6/include/linux/quota.h 2004-04-03 08:46:35.000000000 -0800
    > +++ linus-2.6-inode-shrinkage/include/linux/quota.h 2004-04-03 08:45:19.000000000 -0800
    > @@ -57,7 +57,11 @@
    > #define kb2qb(x) ((x) >> (QUOTABLOCK_BITS-10))
    > #define toqb(x) (((x) + QUOTABLOCK_SIZE - 1) >> QUOTABLOCK_BITS)
    >
    > +#ifdef CONFIG_QUOTA
    > #define MAXQUOTAS 2
    > +#else
    > +#define MAXQUOTAS 0
    > +#endif

    The advantage of the ifdeffy one is that if someone accesses i_dquot
    outside CONFIG_QUOTA, they get a compile failure rather than runtime inode
    corruption.
    -
    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/


  • Next message: Mark Rutherford: "2.6.5 forcedeth sending .. trash? / intel 82540EM dropping packets?"

    Relevant Pages

    • Re: Is it possible to add this feature.
      ... > We will also be loking for ways to specify the limits in a fairly ... Google for two things - firstly Rik van Riel's bits of work (I think it ... send the line "unsubscribe linux-kernel" in ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
      (Linux-Kernel)
    • Re: Single P4, many IDE PCI cards == trouble??
      ... > disk per channel, and have the thing work reliably? ... limits will limit the ultimate performance for mirroring/raid ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: 2.6.0, SiI3112, md raid1 problem: bio too big device (128 > 15)
      ... This is a raid1 bug. ... Some block devices have limits on the sizes of io requests that they ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [TTY] 2 points seems strange to me.
      ... Franck Bui-Huu wrote: ... No, it limits the size to 80 bytes, ... > in interrupt context. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] Fix NR_KEYS off-by-one error
      ... > because it limits the range when struct kbentry ... would limit s, i, and v if struct kbentry was changed to have ... You are absolutely correct that overhead is insignificant. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)