mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: 2.6.5-mm1 [PATCH]
@ 2004-04-05  6:41 Ray Lee
  2004-04-05  6:55 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Ray Lee @ 2004-04-05  6:41 UTC (permalink / raw)
  To: akpm; +Cc: mpm, Linux Kernel

Hello,

Probably the least important email you'll receive all day, but...

> no-quota-inode-shrinkage.patch 
>  shrink inode when quota is disabled

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
 
 #define USRQUOTA  0		/* element used for user quotas */
 #define GRPQUOTA  1		/* element used for group quotas */


--
Ray Lee


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 2.6.5-mm1 [PATCH]
  2004-04-05  6:41 2.6.5-mm1 [PATCH] Ray Lee
@ 2004-04-05  6:55 ` Andrew Morton
  2004-04-05  7:19   ` Ray Lee
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2004-04-05  6:55 UTC (permalink / raw)
  To: Ray Lee; +Cc: mpm, linux-kernel

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: 2.6.5-mm1 [PATCH]
  2004-04-05  6:55 ` Andrew Morton
@ 2004-04-05  7:19   ` Ray Lee
  0 siblings, 0 replies; 3+ messages in thread
From: Ray Lee @ 2004-04-05  7:19 UTC (permalink / raw)
  To: Andrew Morton; +Cc: mpm, Linux Kernel

On Sun, 2004-04-04 at 23:55, Andrew Morton wrote:
> 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.

Ah, that's useful. Point taken.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-04-05  7:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-05  6:41 2.6.5-mm1 [PATCH] Ray Lee
2004-04-05  6:55 ` Andrew Morton
2004-04-05  7:19   ` Ray Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®