ReactOS 0.4.15-dev-7968-g24a56f8
fs.h File Reference
#include <linux/types.h>
#include <linux/atomic.h>
#include <linux/rbtree.h>
Include dependency graph for fs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  super_block
 
struct  inode
 
struct  dentry
 
struct  file
 

Macros

#define NODEV   0
 
#define MINORBITS   8
 
#define MINORMASK   ((1U << MINORBITS) - 1)
 
#define MAJOR(dev)   ((unsigned int)((int)(dev) >> MINORBITS))
 
#define MINOR(dev)   ((unsigned int)((int)(dev) & MINORMASK))
 
#define NODEV   0
 
#define MKDEV(ma, mi)   (((ma) << MINORBITS) | (mi))
 
#define I_DIRTY_SYNC   1 /* Not dirty enough for O_DATASYNC */
 
#define I_DIRTY_DATASYNC   2 /* Data-related inode changes pending */
 
#define I_DIRTY_PAGES   4 /* Data-related inode changes pending */
 
#define I_LOCK   8
 
#define I_FREEING   16
 
#define I_CLEAR   32
 
#define I_DIRTY   (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_PAGES)
 
#define DT_UNKNOWN   0
 
#define DT_FIFO   1
 
#define DT_CHR   2
 
#define DT_DIR   4
 
#define DT_BLK   6
 
#define DT_REG   8
 
#define DT_LNK   10
 
#define DT_SOCK   12
 
#define DT_WHT   14
 

Typedefs

typedef struct block_devicekdev_t
 

Functions

static unsigned int kdev_t_to_nr (kdev_t dev)
 
static kdev_t to_kdev_t (int dev)
 
void iget (struct inode *inode)
 
void iput (struct inode *inode)
 
ULONGLONG bmap (struct inode *i, ULONGLONG b)
 

Macro Definition Documentation

◆ DT_BLK

#define DT_BLK   6

Definition at line 150 of file fs.h.

◆ DT_CHR

#define DT_CHR   2

Definition at line 148 of file fs.h.

◆ DT_DIR

#define DT_DIR   4

Definition at line 149 of file fs.h.

◆ DT_FIFO

#define DT_FIFO   1

Definition at line 147 of file fs.h.

◆ DT_LNK

#define DT_LNK   10

Definition at line 152 of file fs.h.

◆ DT_REG

#define DT_REG   8

Definition at line 151 of file fs.h.

◆ DT_SOCK

#define DT_SOCK   12

Definition at line 153 of file fs.h.

◆ DT_UNKNOWN

#define DT_UNKNOWN   0

Definition at line 146 of file fs.h.

◆ DT_WHT

#define DT_WHT   14

Definition at line 154 of file fs.h.

◆ I_CLEAR

#define I_CLEAR   32

Definition at line 112 of file fs.h.

◆ I_DIRTY

Definition at line 114 of file fs.h.

◆ I_DIRTY_DATASYNC

#define I_DIRTY_DATASYNC   2 /* Data-related inode changes pending */

Definition at line 108 of file fs.h.

◆ I_DIRTY_PAGES

#define I_DIRTY_PAGES   4 /* Data-related inode changes pending */

Definition at line 109 of file fs.h.

◆ I_DIRTY_SYNC

#define I_DIRTY_SYNC   1 /* Not dirty enough for O_DATASYNC */

Definition at line 107 of file fs.h.

◆ I_FREEING

#define I_FREEING   16

Definition at line 111 of file fs.h.

◆ I_LOCK

#define I_LOCK   8

Definition at line 110 of file fs.h.

◆ MAJOR

#define MAJOR (   dev)    ((unsigned int)((int)(dev) >> MINORBITS))

Definition at line 19 of file fs.h.

◆ MINOR

#define MINOR (   dev)    ((unsigned int)((int)(dev) & MINORMASK))

Definition at line 20 of file fs.h.

◆ MINORBITS

#define MINORBITS   8

Definition at line 16 of file fs.h.

◆ MINORMASK

#define MINORMASK   ((1U << MINORBITS) - 1)

Definition at line 17 of file fs.h.

◆ MKDEV

#define MKDEV (   ma,
  mi 
)    (((ma) << MINORBITS) | (mi))

Definition at line 28 of file fs.h.

◆ NODEV [1/2]

#define NODEV   0

Definition at line 27 of file fs.h.

◆ NODEV [2/2]

#define NODEV   0

Definition at line 27 of file fs.h.

Typedef Documentation

◆ kdev_t

Definition at line 14 of file fs.h.

Function Documentation

◆ bmap()

ULONGLONG bmap ( struct inode i,
ULONGLONG  b 
)

Definition at line 942 of file linux.c.

943{
944 ULONGLONG lcn = 0;
945 struct super_block *s = i->i_sb;
946
947 PEXT2_MCB Mcb = (PEXT2_MCB)i->i_priv;
948 PEXT2_VCB Vcb = (PEXT2_VCB)s->s_priv;
952
953 if (!Mcb || !Vcb) {
954 goto errorout;
955 }
956
957 offset <<= BLOCK_BITS;
959 NULL,
960 Vcb,
961 Mcb,
962 offset,
964 FALSE,
965 &extent
966 );
967
968 if (!NT_SUCCESS(status)) {
969 goto errorout;
970 }
971
972 if (extent == NULL) {
973 goto errorout;
974 }
975
976 lcn = (unsigned long)(extent->Lba >> BLOCK_BITS);
977
978errorout:
979
980 if (extent) {
982 }
983
984 return lcn;
985}
LONG NTSTATUS
Definition: precomp.h:26
#define BLOCK_SIZE
Definition: dlist.c:220
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define BLOCK_BITS
Definition: stream.h:22
VOID Ext2FreeExtent(IN PEXT2_EXTENT Extent)
Definition: memory.c:505
struct _EXT2_MCB * PEXT2_MCB
Definition: ext2fs.h:484
NTSTATUS Ext2BuildExtents(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONGLONG Offset, IN ULONG Size, IN BOOLEAN bAlloc, OUT PEXT2_EXTENT *Chain)
Definition: memory.c:1207
IN PVCB IN ULONG IN OUT PULONG IN BOOLEAN OUT PLARGE_MCB Mcb
Definition: fatprocs.h:348
GLdouble s
Definition: gl.h:2039
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLintptr offset
Definition: glext.h:5920
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define Vcb
Definition: cdprocs.h:1415
#define long
Definition: qsort.c:33
Definition: ps.c:97
Definition: fs.h:64
uint64_t ULONGLONG
Definition: typedefs.h:67

Referenced by ext2_allocate_group_table(), and journal_bmap().

◆ iget()

void iget ( struct inode inode)

Definition at line 987 of file linux.c.

988{
990}
static void atomic_inc(atomic_t volatile *v)
Definition: atomic.h:95
Definition: fs.h:78
atomic_t i_count
Definition: fs.h:90

◆ iput()

void iput ( struct inode inode)

Definition at line 992 of file linux.c.

993{
995 kfree(inode);
996 }
997}
static int atomic_dec_and_test(atomic_t volatile *v)
Definition: atomic.h:121
#define kfree(p)
Definition: module.h:1126

Referenced by Ext2RecoverJournal(), and journal_destroy().

◆ kdev_t_to_nr()

static unsigned int kdev_t_to_nr ( kdev_t  dev)
inlinestatic

Definition at line 22 of file fs.h.

22 {
23 /*return (unsigned int)(MAJOR(dev)<<8) | MINOR(dev);*/
24 return 0;
25}

◆ to_kdev_t()

static kdev_t to_kdev_t ( int  dev)
inlinestatic

Definition at line 30 of file fs.h.

31{
32#if 0
33 int major, minor;
34#if 0
35 major = (dev >> 16);
36 if (!major) {
37 major = (dev >> 8);
38 minor = (dev & 0xff);
39 } else
40 minor = (dev & 0xffff);
41#else
42 major = (dev >> 8);
43 minor = (dev & 0xff);
44#endif
45 return (kdev_t) MKDEV(major, minor);
46#endif
47 return 0;
48}
#define MKDEV(ma, mi)
Definition: fs.h:28
#define minor(rdev)
Definition: propsheet.cpp:929
#define major(rdev)
Definition: propsheet.cpp:928