diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-06-03 15:18:07 +0300 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-06-06 18:50:40 +0300 |
commit | 2e107a27f5f0c2aa484b821d8504c3575467b95a (patch) | |
tree | b88125bb14a088a1b4352b1cce5de39943363ab4 /fs/ubifs/key.h | |
parent | 6370a704b36adbb15d0004615d2febce96be650d (diff) |
UBIFS: add file-system checking function
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/key.h')
-rw-r--r-- | fs/ubifs/key.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/ubifs/key.h b/fs/ubifs/key.h index 2dfc32d36e60..5a919d0ad853 100644 --- a/fs/ubifs/key.h +++ b/fs/ubifs/key.h @@ -453,6 +453,19 @@ static inline unsigned int key_block(const struct ubifs_info *c, } /** + * key_block_flash - get data block number from an on-flash formatted key. + * @c: UBIFS file-system description object + * @k: the key to get the block number from + */ +static inline unsigned int key_block_flash(const struct ubifs_info *c, + const void *k) +{ + const union ubifs_key *key = k; + + return le32_to_cpu(key->u32[1]) & UBIFS_S_KEY_BLOCK_MASK; +} + +/** * key_read - transform a key to in-memory format. * @c: UBIFS file-system description object * @from: the key to transform |