xref: /linux/fs/nilfs2/direct.h (revision 03ab8e6297acd1bc0eedaa050e2a1635c576fd11)
1ae98043fSRyusuke Konishi /* SPDX-License-Identifier: GPL-2.0+ */
236a580ebSKoji Sato /*
3*94ee1d91SRyusuke Konishi  * NILFS direct block pointer.
436a580ebSKoji Sato  *
536a580ebSKoji Sato  * Copyright (C) 2006-2008 Nippon Telegraph and Telephone Corporation.
636a580ebSKoji Sato  *
74b420ab4SRyusuke Konishi  * Written by Koji Sato.
836a580ebSKoji Sato  */
936a580ebSKoji Sato 
1036a580ebSKoji Sato #ifndef _NILFS_DIRECT_H
1136a580ebSKoji Sato #define _NILFS_DIRECT_H
1236a580ebSKoji Sato 
1336a580ebSKoji Sato #include <linux/types.h>
1436a580ebSKoji Sato #include <linux/buffer_head.h>
1536a580ebSKoji Sato #include "bmap.h"
1636a580ebSKoji Sato 
1736a580ebSKoji Sato 
1836a580ebSKoji Sato #define NILFS_DIRECT_NBLOCKS	(NILFS_BMAP_SIZE / sizeof(__le64) - 1)
1936a580ebSKoji Sato #define NILFS_DIRECT_KEY_MIN	0
2036a580ebSKoji Sato #define NILFS_DIRECT_KEY_MAX	(NILFS_DIRECT_NBLOCKS - 1)
2136a580ebSKoji Sato 
2236a580ebSKoji Sato 
233033342aSRyusuke Konishi int nilfs_direct_init(struct nilfs_bmap *);
2436a580ebSKoji Sato int nilfs_direct_delete_and_convert(struct nilfs_bmap *, __u64, __u64 *,
253033342aSRyusuke Konishi 				    __u64 *, int);
2636a580ebSKoji Sato 
2736a580ebSKoji Sato 
2836a580ebSKoji Sato #endif	/* _NILFS_DIRECT_H */
29