/* -*- Mode: C++; tab-width: 8; c-basic-offset: 8 -*-
 *
 */

#ifndef __LFSSegment_h__
#define __LFSSegment_h__

#include <linux/fs.h>
#include <linux/lfs_fs.h>

class CLFSSegment {
public:
	CLFSSegment(unsigned short nr, struct lfs_smap_entry* sme)
		: m_nr(nr) {
		memcpy(&m_sme, sme, sizeof(m_sme));
	};

	unsigned short Number() {
		return m_nr;
	};

	unsigned short UsedBlocks() {
		return m_sme.e_used_blocks;
	};

	unsigned short SummaryBlockAddr() {
		return m_sme.e_summary_block;
	};

private:
	unsigned short m_nr;
	struct lfs_smap_entry m_sme;
};


#endif __LFSSegment_h__

