Re: [PATCH 1/3] replace PAGECACHE_TAG_* definition with enumeration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 02, 2014 at 09:45:07AM -0700, Dave Hansen wrote:
> On 06/02/2014 09:37 AM, Naoya Horiguchi wrote:
> > On Mon, Jun 02, 2014 at 09:12:25AM -0700, Dave Hansen wrote:
> >> > On 06/01/2014 10:24 PM, Naoya Horiguchi wrote:
> >>> > > -#define PAGECACHE_TAG_DIRTY	0
> >>> > > -#define PAGECACHE_TAG_WRITEBACK	1
> >>> > > -#define PAGECACHE_TAG_TOWRITE	2
> >>> > > +enum {
> >>> > > +	PAGECACHE_TAG_DIRTY,
> >>> > > +	PAGECACHE_TAG_WRITEBACK,
> >>> > > +	PAGECACHE_TAG_TOWRITE,
> >>> > > +	__NR_PAGECACHE_TAGS,
> >>> > > +};
> >> > 
> >> > Doesn't this end up exposing kernel-internal values out to a userspace
> >> > interface?  Wouldn't that lock these values in to the ABI?
> > Yes, that would. I hope these PAGECACHE_TAG_* stuff is very basic
> > things and will never change drastically in the future (only added),
> > so it's unlikely to bother people about ABI breakage things.
> 
> OK, so if I'm writing a userspace program, which header do I include
> pull these values in to my program?

Yes, that's necessary to consider (but I haven't done, sorry),
so I'm thinking of moving this definition to the new file
include/uapi/linux/pagecache.h and let it be imported from the
userspace programs. Is it fine?

Thanks,
Naoya Horiguchi

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]