#ifndef _ASM_GENERIC_SWAB_H #define _ASM_GENERIC_SWAB_H #include /* * 32 bit architectures typically (but not always) want to * set __SWAB_64_THRU_32__. In user space, this is only * valid if the compiler supports 64 bit data types. */ #if __BITS_PER_LONG == 32 #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) #define __SWAB_64_THRU_32__ #endif #endif #endif /* _ASM_GENERIC_SWAB_H */ nz.ch/linux/net-next.git' title='net-next.git Git repository'/>
summaryrefslogtreecommitdiff
path: root/fs/dax.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2016-08-10 17:10:28 +0200
committerDan Williams <dan.j.williams@intel.com>2016-12-26 20:29:24 -0800
commite3fce68cdbed297d927e993b3ea7b8b1cee545da (patch)
tree52e8c6f6bea775cb623cfca46012b91657b7dc47 /fs/dax.c
parentc6dcf52c23d2d3fb5235cec42d7dd3f786b87d55 (diff)
dax: Avoid page invalidation races and unnecessary radix tree traversals
Currently dax_iomap_rw() takes care of invalidating page tables and evicting hole pages from the radix tree when write(2) to the file happens. This invalidation is only necessary when there is some block allocation resulting from write(2). Furthermore in current place the invalidation is racy wrt page fault instantiating a hole page just after we have invalidated it. So perform the page invalidation inside dax_iomap_actor() where we can do it only when really necessary and after blocks have been allocated so nobody will be instantiating new hole pages anymore. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'fs/dax.c')
-rw-r--r--fs/dax.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/fs/dax.c b/fs/dax.c