Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1689080

Re: [PATCH 2/4] fs/dcache: Report negative dentry number in dentry-state

From Matthew Wilcox <willy@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/4] fs/dcache: Report negative dentry number in dentry-state
Date 2017-07-17 16:10 +0200
Message-ID <u4eSK-65Z-23@gated-at.bofh.it> (permalink)
References <u4epJ-5H0-31@gated-at.bofh.it> <u4ezo-5Kj-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Jul 17, 2017 at 09:39:31AM -0400, Waiman Long wrote:
> @@ -63,9 +63,10 @@ struct qstr {
>  struct dentry_stat_t {
>  	long nr_dentry;
>  	long nr_unused;
> -	long age_limit;          /* age in seconds */
> -	long want_pages;         /* pages requested by system */
> -	long dummy[2];
> +	long nr_negative;	/* # of negative dentries */
> +	long age_limit;		/* age in seconds */
> +	long want_pages;	/* pages requested by system */
> +	long dummy;
>  };
>  extern struct dentry_stat_t dentry_stat;

You can't just insert a field in the middle like that.  It'll break any code
parsing /proc/sys/fs/dentry-state.  You have to put it at the end:

 	long age_limit;          /* age in seconds */
 	long want_pages;         /* pages requested by system */
-	long dummy[2];
+	long nr_negative;	/* # of negative dentries */
+	long dummy;
 };

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] fs/dcache: Limit # of negative dentries Waiman Long <longman@redhat.com> - 2017-07-17 15:40 +0200
  [PATCH 2/4] fs/dcache: Report negative dentry number in dentry-state Waiman Long <longman@redhat.com> - 2017-07-17 15:50 +0200
    Re: [PATCH 2/4] fs/dcache: Report negative dentry number in  dentry-state Matthew Wilcox <willy@infradead.org> - 2017-07-17 16:10 +0200
      Re: [PATCH 2/4] fs/dcache: Report negative dentry number in  dentry-state Waiman Long <longman@redhat.com> - 2017-07-17 16:40 +0200
  [PATCH 1/4] fs/dcache: Limit numbers of negative dentries Waiman Long <longman@redhat.com> - 2017-07-17 15:50 +0200
    Re: [PATCH 1/4] fs/dcache: Limit numbers of negative dentries Matthew Wilcox <willy@infradead.org> - 2017-07-17 19:50 +0200
      Re: [PATCH 1/4] fs/dcache: Limit numbers of negative dentries Waiman Long <longman@redhat.com> - 2017-07-17 20:40 +0200
  [PATCH 3/4] fs/dcache: Enable automatic pruning of negative dentries Waiman Long <longman@redhat.com> - 2017-07-17 15:50 +0200
  [PATCH 4/4] fs/dcache: Protect negative dentry pruning from racing with umount Waiman Long <longman@redhat.com> - 2017-07-17 15:50 +0200

csiph-web