ReactOS 0.4.15-dev-7704-gc07eb9f
ext4_bh.c
Go to the documentation of this file.
1#include <ext2fs.h>
2#include <linux/module.h>
3#include <linux/errno.h>
4
5/*
6 * extents_bread: This function is a wrapper of CcPinRead routine.
7 *
8 * @sb: the device we need to undergo buffered IO on.
9 * @block: the block we want to read from.
10 *
11 * If the call to this routine succeeds, the pages underlying the buffer header
12 * will be locked into memory, so that the buffer header returned for use is safe.
13 */
14struct buffer_head *
16{
17 return sb_getblk(sb, block);
18}
19
20/*
21 * extents_bwrite: This function is a wrapper of CcPreparePinWrite routine.
22 *
23 * @sb: the device we need to undergo buffered IO on.
24 * @block: the block we want to write to.
25 */
26struct buffer_head *
28{
29 return sb_getblk_zero(sb, block);
30
31}
32
33/*
34 * extents_mark_buffer_dirty: Mark the buffer dirtied and so
35 * that changes will be written back.
36 *
37 * @bh: The corresponding buffer header that is modified.
38 */
40{
41 set_buffer_dirty(bh);
42}
43
44/*
45 * extents_brelse: Release the corresponding buffer header.
46 *
47 * @bh: The corresponding buffer header that is going to be freed.
48 *
49 * The pages underlying the buffer header will be unlocked.
50 */
52{
53 brelse(bh);
54}
55
56/*
57 * extents_bforget: Release the corresponding buffer header.
58 * NOTE: The page owned by @bh will be marked invalidated.
59 *
60 * @bh: The corresponding buffer header that is going to be freed.
61 *
62 * The pages underlying the buffer header will be unlocked.
63 */
65{
66 clear_buffer_uptodate(bh);
67 bforget(bh);
68}
superblock * sb
Definition: btrfs.c:4261
unsigned __int64 sector_t
Definition: types.h:82
struct buffer_head * extents_bread(struct super_block *sb, sector_t block)
Definition: ext4_bh.c:15
void extents_brelse(struct buffer_head *bh)
Definition: ext4_bh.c:51
struct buffer_head * extents_bwrite(struct super_block *sb, sector_t block)
Definition: ext4_bh.c:27
void extents_bforget(struct buffer_head *bh)
Definition: ext4_bh.c:64
void extents_mark_buffer_dirty(struct buffer_head *bh)
Definition: ext4_bh.c:39
static void bforget(struct buffer_head *bh)
Definition: module.h:969
static struct buffer_head * sb_getblk(struct super_block *sb, sector_t block)
Definition: module.h:976
static void brelse(struct buffer_head *bh)
Definition: module.h:955
static struct buffer_head * sb_getblk_zero(struct super_block *sb, sector_t block)
Definition: module.h:982
Definition: fs.h:64
static unsigned int block
Definition: xmlmemory.c:101