Show
Ignore:
Timestamp:
07/07/08 20:08:19 (5 months ago)
Author:
mwhitworth
Message:

Change VNodeSetDirty to inline function, add flags parameter to BlockMap.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Whitix/branches/fs/include/fs/vfs.h

    r670 r744  
    3131#include <wait.h> 
    3232 
     33/* Include all virtual filesystem headers, so we don't repeat ourselves in source files. */ 
     34#include <fs/super.h> 
     35#include <fs/bcache.h> 
    3336#include <fs/exports.h> 
    3437 
     
    149152}; 
    150153 
    151 #define SetVNodeDirty(vNode) (((vNode)->flags) |= VNODE_DIRTY) 
     154static inline void SetVNodeDirty(struct VNode* vNode) 
     155{ 
     156        vNode->flags |= VNODE_DIRTY; 
     157        if (vNode->superBlock && vNode->superBlock->sbOps->dirtyVNode) 
     158                vNode->superBlock->sbOps->dirtyVNode(vNode); 
     159} 
    152160 
    153161/* FILE 
     
    183191int FillDir(void* dirEntry,char* name,int nameLen,DWORD vNodeNum);  
    184192 
     193/* Flags to pass to block map */ 
     194#define VFS_MAP_CREATE          0x1 
     195 
    185196struct VNodeOps 
    186197{ 
     
    191202        int (*rmDir)(struct VNode* dir,char* name,int nameLength); 
    192203        int (*permission)(struct VNode* vNode,int access); 
    193         int (*blockMap)(struct VNode* vNode, DWORD offset); 
     204        int (*blockMap)(struct VNode* vNode, DWORD offset, int flags); 
    194205        int (*truncate)(struct VNode* vNode, int size); 
    195206}; 
     
    236247int PollAddWait(struct PollQueue* pollQueue, WaitQueue* waitQueue); 
    237248 
    238 /* Include all virtual filesystem headers, so we don't repeat ourselves in source files. */ 
    239 #include <fs/super.h> 
    240 #include <fs/bcache.h> 
    241  
    242249#endif