]> git.sur5r.net Git - u-boot/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)
commit597b4aff7b5d85946d2028ab9498116f53357dbc
tree9f0528ea96aa9996564fb0cc640d07717cc0d8d8
parentd4a704af5d2d365c85801a7d3cd5560fa865d445
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]