23#pragma alloc_text(PAGE, kzalloc)
95 ptr = ExAllocateFromNPagedLookasideList(&(kc->
la));
107 ExFreeToNPagedLookasideList(&(kc->
la),
p);
172 wait->
flags &= ~WQ_FLAG_EXCLUSIVE;
217 wait->
flags &= ~WQ_FLAG_EXCLUSIVE;
302 g_jbh.bh_count.counter = 0;
303 g_jbh.bh_acount.counter = 0;
320 if (
g_jbh.bh_cache) {
351 DEBUG(
DL_BH, (
"bh=%p mdl=%p (Flags:%xh VA:%p) released.\n", bh, bh->
b_mdl,
352 bh->
b_mdl->MdlFlags, bh->
b_mdl->MappedSystemVa));
503 set_buffer_uptodate(bh);
523 DEBUG(
DL_BH, (
"getblk: Vcb=%p bhcount=%u block=%u bh=%p mdl=%p (Flags:%xh VA:%p)\n",
689 set_buffer_uptodate(bh);
702 DEBUG(
DL_BH, (
"getblk: Vcb=%p bhcount=%u block=%u bh=%p ptr=%p.\n",
816 while (buffer_dirty(bh)) {
837 DEBUG(
DL_BH, (
"brelse: cnt=%u size=%u blk=%10.10xh bh=%p ptr=%p\n",
845 clear_buffer_dirty(bh);
855 clear_buffer_locked(bh);
866 for (
i = 0;
i <
nr;
i++) {
872 else if (test_set_buffer_locked(bh))
876 if (test_clear_buffer_dirty(bh)) {
882 if (!buffer_uptodate(bh)) {
904 if (test_clear_buffer_dirty(bh)) {
916 set_buffer_dirty(bh);
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
struct outqueuenode * head
static void atomic_inc(atomic_t volatile *v)
static void atomic_dec(atomic_t volatile *v)
static int atomic_dec_and_test(atomic_t volatile *v)
static int list_empty(struct list_entry *head)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
static void list_add(struct list_entry *entry, struct list_entry *prev, struct list_entry *next)
VOID NTAPI CcSetDirtyPinnedData(IN PVOID BcbVoid, IN OPTIONAL PLARGE_INTEGER Lsn)
#define NT_SUCCESS(StatCode)
#define INIT_LIST_HEAD(ptr)
static void list_del(struct list_head *entry)
static void list_del_init(struct list_head *entry)
static int list_empty_careful(const struct list_head *head)
void rb_erase(struct rb_node *, struct rb_root *)
void rb_insert(struct rb_root *root, struct rb_node *node, int(*cmp)(struct rb_node *, struct rb_node *))
unsigned __int64 sector_t
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define IsListEmpty(ListHead)
#define KeInitializeEvent(pEvt, foo, foo2)
#define KeSetEvent(pEvt, foo, foo2)
#define KeQuerySystemTime(t)
#define ExAcquireResourceExclusiveLite(res, wait)
#define InitializeListHead(ListHead)
VOID NTAPI KeClearEvent(IN PKEVENT Event)
#define IsVcbReadOnly(Vcb)
VOID Ext2FreeExtent(IN PEXT2_EXTENT Extent)
#define DEC_MEM_COUNT(_i, _p, _s)
struct _EXT2_MCB * PEXT2_MCB
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)
struct _EXT2_VCB * PEXT2_VCB
BOOLEAN Ext2AddBlockExtent(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Start, IN ULONG Block, IN ULONG Number)
#define INC_MEM_COUNT(_i, _p, _s)
PMDL Ext2CreateMdl(IN PVOID Buffer, IN ULONG Length, IN LOCK_OPERATION Operation)
VOID Ext2DestroyMdl(IN PMDL Mdl)
NTSTATUS Ext2FlushVolume(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN BOOLEAN bShutDown)
IN PVCB IN VBO IN ULONG OUT PBCB * Bcb
IN PVCB IN ULONG IN OUT PULONG IN BOOLEAN OUT PLARGE_MCB Mcb
GLdouble GLdouble GLdouble GLdouble q
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
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
#define container_of(ptr, type, member)
#define KeGetCurrentThread
void free_buffer_head(struct buffer_head *bh)
kmem_cache_t * kmem_cache_create(const char *name, size_t size, size_t offset, unsigned long flags, kmem_cache_cb_t ctor)
void iget(struct inode *inode)
void remove_wait_queue(wait_queue_head_t *q, wait_queue_t *waiti)
void add_wait_queue(wait_queue_head_t *q, wait_queue_t *waiti)
struct buffer_head * new_buffer_head()
void __brelse(struct buffer_head *bh)
static void buffer_head_insert(struct block_device *bdev, struct buffer_head *bh)
void iput(struct inode *inode)
struct buffer_head * __find_get_block(struct block_device *bdev, sector_t block, unsigned long size)
struct task_struct * current
void kmem_cache_free(kmem_cache_t *kc, void *p)
static struct buffer_head * __buffer_head_search(struct rb_root *root, sector_t blocknr)
struct buffer_head * get_block_bh_mdl(struct block_device *bdev, sector_t block, unsigned long size, int zero)
struct task_struct current_task
int submit_bh_mdl(int rw, struct buffer_head *bh)
void unlock_buffer(struct buffer_head *bh)
struct _EXT2_BUFFER_HEAD g_jbh
struct buffer_head * get_block_bh_pin(struct block_device *bdev, sector_t block, unsigned long size, int zero)
struct buffer_head * get_block_bh(struct block_device *bdev, sector_t block, unsigned long size, int zero)
struct __wait_queue * wait_queue_create()
static void __add_wait_queue_tail(wait_queue_head_t *head, struct __wait_queue *new)
static struct buffer_head * buffer_head_search(struct block_device *bdev, sector_t blocknr)
struct buffer_head * __getblk(struct block_device *bdev, sector_t block, unsigned long size)
void * kmem_cache_alloc(kmem_cache_t *kc, int flags)
void prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *waiti, int state)
int kmem_cache_destroy(kmem_cache_t *kc)
void * kzalloc(int size, int flags)
static int buffer_head_blocknr_cmp(struct rb_node *a, struct rb_node *b)
void ext2_destroy_linux()
int wake_up(wait_queue_head_t *queue)
void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *waiti, int state)
int bh_submit_read(struct buffer_head *bh)
static void __remove_wait_queue(wait_queue_head_t *head, struct __wait_queue *old)
int submit_bh_pin(int rw, struct buffer_head *bh)
int sync_dirty_buffer(struct buffer_head *bh)
int submit_bh(int rw, struct buffer_head *bh)
void buffer_head_remove(struct block_device *bdev, struct buffer_head *bh)
void __bforget(struct buffer_head *bh)
void __wait_on_buffer(struct buffer_head *bh)
void init_waitqueue_head(wait_queue_head_t *q)
void __lock_buffer(struct buffer_head *bh)
void wait_queue_destroy(struct __wait_queue *wait)
ULONGLONG bmap(struct inode *i, ULONGLONG b)
void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t *waiti)
static void __add_wait_queue(wait_queue_head_t *head, struct __wait_queue *new)
int sync_blockdev(struct block_device *bdev)
void ll_rw_block(int rw, int nr, struct buffer_head *bhs[])
void mark_buffer_dirty(struct buffer_head *bh)
void finish_wait(wait_queue_head_t *q, wait_queue_t *waiti)
VOID NTAPI ExDeleteNPagedLookasideList(IN PNPAGED_LOOKASIDE_LIST Lookaside)
VOID NTAPI ExInitializeNPagedLookasideList(IN PNPAGED_LOOKASIDE_LIST Lookaside, IN PALLOCATE_FUNCTION Allocate OPTIONAL, IN PFREE_FUNCTION Free OPTIONAL, IN ULONG Flags, IN SIZE_T Size, IN ULONG Tag, IN USHORT Depth)
#define memmove(s1, s2, n)
PVOID NTAPI MmMapLockedPagesSpecifyCache(IN PMDL Mdl, IN KPROCESSOR_MODE AccessMode, IN MEMORY_CACHING_TYPE CacheType, IN PVOID BaseAddress, IN ULONG BugCheckOnFailure, IN ULONG Priority)
VOID NTAPI MmUnmapLockedPages(IN PVOID BaseAddress, IN PMDL Mdl)
#define kmalloc(size, gfp)
static void put_bh(struct buffer_head *bh)
static void lock_buffer(struct buffer_head *bh)
#define __set_current_state(state)
static void get_bh(struct buffer_head *bh)
#define is_sync_wait(wait)
static void wait_on_buffer(struct buffer_head *bh)
#define WQ_FLAG_EXCLUSIVE
void(* kmem_cache_cb_t)(void *, kmem_cache_t *, unsigned long)
#define spin_lock_init(sl)
#define spin_lock_irqsave(sl, flags)
#define spin_unlock_irqrestore(sl, flags)
#define set_current_state(state)
#define WQ_FLAG_AUTO_REMOVAL
_In_ ULONG _In_ ULONG Offset
BOOLEAN NTAPI ExAcquireSharedStarveExclusive(IN PERESOURCE Resource, IN BOOLEAN Wait)
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
VOID NTAPI CcUnpinData(IN PVOID Bcb)
VOID NTAPI CcSetBcbOwnerPointer(IN PVOID Bcb, IN PVOID OwnerPointer)
VOID NTAPI CcUnpinDataForThread(IN PVOID Bcb, IN ERESOURCE_THREAD ResourceThreadId)
BOOLEAN NTAPI CcPreparePinWrite(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Zero, IN ULONG Flags, OUT PVOID *Bcb, OUT PVOID *Buffer)
BOOLEAN NTAPI CcPinRead(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, OUT PVOID *Bcb, OUT PVOID *Buffer)
struct list_head task_list
struct rb_root bd_bh_root
struct block_device * b_bdev
kmem_cache_cb_t constructor
#define new(TYPE, numElems)
#define READ(_gif, _buf, _len)
ULONG_PTR ERESOURCE_THREAD
#define MDL_MAPPED_TO_SYSTEM_VA
static unsigned int block