ShingledFS 2.0
SMR-AwareFUSE-basedFileSystem

inode.c File Reference

Implements the inode abstraction for ShingledFS. More...

#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <limits.h>
#include <string.h>
#include <stdlib.h>
#include "helper.h"
#include "common.h"
#include "inode.h"

Go to the source code of this file.

Functions

int get_offset (int inode_num)
 Returns the offset of an inode record in the inodes file.
int init_inodebitmap (void)
 Initializes the inode bitmap.
int init_inodelist (void)
 Initializes the inode list.

Detailed Description

Implements the inode abstraction for ShingledFS.

Author:
Jainam Shah <jashah@andrew.cmu.edu>
Anand Suresh <anandsuresh@cmu.edu>

Definition in file inode.c.


Function Documentation

int get_offset ( int  inode_num)

Returns the offset of an inode record in the inodes file.

Parameters:
inode_numThe INode number
Returns:
Offset in inode in the inodes file

Definition at line 96 of file inode.c.

int init_inodebitmap ( void  )

Initializes the inode bitmap.

Returns:
File descriptor of the Inode Bitmap file on success. -1 on failure

Definition at line 110 of file inode.c.

References translate_path().

Referenced by shingledfs_init().

int init_inodelist ( void  )

Initializes the inode list.

If the inode list already exists then will open the inode list file and return the file descriptor.

Parameters:
:None.
Returns:
fd : File descriptor on Success. -1 : on Error.

Definition at line 158 of file inode.c.

References translate_path().

Referenced by shingledfs_init().