linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arun Sharma <asharma@fb.com>
To: Andrea Righi <andrea@betterlinux.com>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
	"Minchan Kim" <minchan.kim@gmail.com>,
	"Peter Zijlstra" <a.p.zijlstra@chello.nl>,
	"Johannes Weiner" <jweiner@redhat.com>,
	"KAMEZAWA Hiroyuki" <kamezawa.hiroyu@jp.fujitsu.com>,
	"KOSAKI Motohiro" <kosaki.motohiro@jp.fujitsu.com>,
	"Rik van Riel" <riel@redhat.com>,
	"Hugh Dickins" <hughd@google.com>,
	"Alexander Viro" <viro@zeniv.linux.org.uk>,
	"Shaohua Li" <shaohua.li@intel.com>,
	"Pádraig Brady" <P@draigBrady.com>,
	"John Stultz" <john.stultz@linaro.org>,
	"Jerry James" <jamesjer@betterlinux.com>,
	"Julius Plenz" <julius@plenz.com>, linux-mm <linux-mm@kvack.org>,
	linux-fsdevel@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5 3/3] fadvise: implement POSIX_FADV_NOREUSE
Date: Wed, 15 Feb 2012 15:57:47 -0800	[thread overview]
Message-ID: <4F3C467B.1@fb.com> (raw)
In-Reply-To: <20120215234724.GA21685@thinkpad>



On 2/15/12 3:47 PM, Andrea Righi wrote:
>> index 74b6a97..b4e45e6 100644
>> --- a/include/linux/fs.h
>> +++ b/include/linux/fs.h
>> @@ -9,7 +9,6 @@
>>   #include<linux/limits.h>
>>   #include<linux/ioctl.h>
>>   #include<linux/blk_types.h>
>> -#include<linux/kinterval.h>
>>   #include<linux/types.h>
>>
>>   /*
>> @@ -656,7 +655,7 @@ struct address_space {
>>   	spinlock_t		private_lock;	/* for use by the address_space */
>>   	struct list_head	private_list;	/* ditto */
>>   	struct address_space	*assoc_mapping;	/* ditto */
>> -	struct rb_root		nocache_tree;	/* noreuse cache range tree */
>> +	void			*nocache_tree;	/* noreuse cache range tree */
>>   	rwlock_t		nocache_lock;	/* protect the nocache_tree */
>>   } __attribute__((aligned(sizeof(long))));
>>   	/*
>
> mmh.. a forward declaration of rb_root in fs.h shouldn't be better than
> this?
>

Forward declaration works if the type was struct rb_root *. But the type 
in your patch was a struct and the compiler can't figure out its size.

include/linux/fs.h:659:17: error: field ‘nocache_tree’ has incomplete type

Did you mean forward declaring struct rb_node instead of rb_root?

If we go down this path, a few more places need fixups (I ignored the 
compiler warnings about casting void * to struct rb_root *).

  -Arun

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2012-02-15 23:59 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-12  0:21 [RFC] [PATCH v5 0/3] fadvise: support POSIX_FADV_NOREUSE Andrea Righi
2012-02-12  0:21 ` [PATCH v5 1/3] kinterval: routines to manipulate generic intervals Andrea Righi
2012-02-13  0:48   ` Andrea Righi
2012-02-12  0:21 ` [PATCH v5 2/3] mm: filemap: introduce mark_page_usedonce Andrea Righi
2012-02-12  0:21 ` [PATCH v5 3/3] fadvise: implement POSIX_FADV_NOREUSE Andrea Righi
2012-02-13 16:22   ` KOSAKI Motohiro
2012-02-13 16:22   ` KOSAKI Motohiro
     [not found]   ` <CAHGf_=qs8-nE6y6EzNYUzgjGo0sMP5zvCc3=GNZmHct6mPecqg@mail.gmail.com>
2012-02-13 18:00     ` Andrea Righi
2012-02-15 23:35   ` Arun Sharma
2012-02-15 23:47     ` Andrea Righi
2012-02-15 23:57       ` Arun Sharma [this message]
2012-02-16  0:56         ` Andrea Righi
2012-02-16  2:10           ` Arun Sharma
2012-02-16 10:39             ` Andrea Righi
2012-02-16 18:43               ` Arun Sharma
2012-02-16 18:57                 ` Andrea Righi
2012-02-16 19:07                   ` Arun Sharma
2012-02-27  2:33   ` KAMEZAWA Hiroyuki
2012-02-27 10:46     ` Andrea Righi
2012-02-14 21:33 ` [RFC] [PATCH v5 0/3] fadvise: support POSIX_FADV_NOREUSE Andrew Morton
2012-02-14 22:06   ` John Stultz
2012-02-14 22:59   ` Andrea Righi
2012-02-14 23:22     ` Andrew Morton
2012-02-15  1:35       ` Andrea Righi
2012-02-15 23:48         ` KAMEZAWA Hiroyuki
2012-02-16  0:43           ` Andrea Righi
2014-01-02 21:25             ` Phillip Susi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F3C467B.1@fb.com \
    --to=asharma@fb.com \
    --cc=P@draigBrady.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=andrea@betterlinux.com \
    --cc=hughd@google.com \
    --cc=jamesjer@betterlinux.com \
    --cc=john.stultz@linaro.org \
    --cc=julius@plenz.com \
    --cc=jweiner@redhat.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan.kim@gmail.com \
    --cc=riel@redhat.com \
    --cc=shaohua.li@intel.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).