linux/fs/btrfs
David Sterba 7e75bf3ff3 btrfs: properly access unaligned checksum buffer
On Fri, Mar 18, 2011 at 11:56:53AM -0400, Chris Mason wrote:
> Thanks for fielding this one.  Does put_unaligned_le32 optimize away on
> platforms with efficient access?  It would be great if we didn't need
> the #ifdef.

(quicktest: assembly output is same for put_unaligned_le32 and direct
assignment on my x86_64)
I was originally following examples in
Documentation/unaligned-memory-access.txt. From other code it seems to me that
the define CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is intended for larger
portions of code. Macros/wrappers for {put,get}_unaligned* are chosen via
arch/<arch>/include/asm/unaligned.h accordingly, therefore it's safe to use
put_unaligned_le32 without the ifdef.

dave

Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-03-28 05:37:36 -04:00
..
Kconfig
Makefile
acl.c
async-thread.c
async-thread.h
btrfs_inode.h
compat.h
compression.c
compression.h
ctree.c Btrfs: cleanup some BUG_ON() 2011-03-28 05:37:35 -04:00
ctree.h Btrfs: add initial tracepoint support for btrfs 2011-03-28 05:37:33 -04:00
delayed-ref.c Btrfs: add initial tracepoint support for btrfs 2011-03-28 05:37:33 -04:00
delayed-ref.h
dir-item.c
disk-io.c btrfs: properly access unaligned checksum buffer 2011-03-28 05:37:36 -04:00
disk-io.h
export.c
export.h
extent-tree.c Btrfs: cleanup some BUG_ON() 2011-03-28 05:37:35 -04:00
extent_io.c Btrfs: add initial tracepoint support for btrfs 2011-03-28 05:37:33 -04:00
extent_io.h
extent_map.c
extent_map.h
file-item.c Btrfs: cleanup some BUG_ON() 2011-03-28 05:37:35 -04:00
file.c Btrfs: add initial tracepoint support for btrfs 2011-03-28 05:37:33 -04:00
free-space-cache.c
free-space-cache.h
hash.h
inode-item.c
inode-map.c Btrfs: cleanup some BUG_ON() 2011-03-28 05:37:35 -04:00
inode.c Btrfs: add initial tracepoint support for btrfs 2011-03-28 05:37:33 -04:00
ioctl.c Btrfs: cleanup some BUG_ON() 2011-03-28 05:37:35 -04:00
ioctl.h
locking.c
locking.h
lzo.c
ordered-data.c Btrfs: add initial tracepoint support for btrfs 2011-03-28 05:37:33 -04:00
ordered-data.h
orphan.c
print-tree.c
print-tree.h
ref-cache.c
ref-cache.h
relocation.c
root-tree.c Btrfs: cleanup some BUG_ON() 2011-03-28 05:37:35 -04:00
struct-funcs.c
super.c Btrfs: add initial tracepoint support for btrfs 2011-03-28 05:37:33 -04:00
sysfs.c
transaction.c Btrfs: cleanup some BUG_ON() 2011-03-28 05:37:35 -04:00
transaction.h
tree-defrag.c
tree-log.c Btrfs: cleanup some BUG_ON() 2011-03-28 05:37:35 -04:00
tree-log.h
version.h
version.sh
volumes.c Btrfs: add initial tracepoint support for btrfs 2011-03-28 05:37:33 -04:00
volumes.h Btrfs: add initial tracepoint support for btrfs 2011-03-28 05:37:33 -04:00
xattr.c
xattr.h
zlib.c