]> git.baikalelectronics.ru Git - uboot.git/commit
fs: btrfs: Add disk-to-cpu and cpu-to-disk conversion functions
authorMarek BehĂșn <marek.behun@nic.cz>
Sun, 3 Sep 2017 15:00:27 +0000 (17:00 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 3 Oct 2017 01:52:17 +0000 (21:52 -0400)
commit26d551398a8e35d25221fd1f139bf637c32d9f0b
tree9f0528ea96aa9996564fb0cc640d07717cc0d8d8
parent4f8cf4e5635b6ce154a7b39611d8a2f00bba7e39
fs: btrfs: Add disk-to-cpu and cpu-to-disk conversion functions

BTRFS on disk structures are stored in Little Endian. Add functions
to convert this structures to cpu and to disk format.

On Little Endian hosts, these functions do nothing.

On Big Endian the CALL_MACRO_FROM_EACH from variadic-macro.h is used
to define all the members for each structure on which cpu_to_le* or
le*_to_cpu is to be called.

Signed-off-by: Marek Behun <marek.behun@nic.cz>
 create mode 100644 fs/btrfs/conv-funcs.h
fs/btrfs/conv-funcs.h [new file with mode: 0644]