linux-2.6.33/dio
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#h9002b8f]
#backlinks
*説明 [#k6178c22]
-パス: [[linux-2.6.33/fs/direct-io.c]]
-FIXME: これは何?
--説明
**参考 [#u3541e5c]
*実装 [#m5616caa]
/*
* This code generally works in units of "dio_blocks". ...
* somewhere between the hard sector size and the filesy...
* is determined on a per-invocation basis. When talki...
* we need to convert dio_blocks to fs_blocks by scaling...
* down by dio->blkfactor. Similarly, fs-blocksize quan...
* to bio_block quantities by shifting left by blkfactor.
*
* If blkfactor is zero then the user's request was alig...
* blocksize.
*/
struct dio {
/* BIO submission state */
struct bio *bio; /* bio under assembly */
-
--[[linux-2.6.33/bio]]
struct inode *inode;
-
--[[linux-2.6.33/inode]]
int rw;
loff_t i_size; /* i_size when submitted */
-
--[[linux-2.6.33/loff_t]]
int flags; /* doesn't change */
unsigned blkbits; /* doesn't change */
unsigned blkfactor; /* When we're using an alignment w...
is finer than the filesystem's soft
blocksize, this specifies how much
finer. blkfactor=2 means 1/4-block
alignment. Does not change */
unsigned start_zero_done; /* flag: sub-blocksize zeroin...
been performed at the start of a
write */
int pages_in_io; /* approximate total IO pages */
size_t size; /* total request size (doesn't change)*/
sector_t block_in_file; /* Current offset into the und...
file in dio_block units. */
-
--[[linux-2.6.33/sector_t]]
unsigned blocks_available; /* At block_in_file. change...
sector_t final_block_in_request;/* doesn't change */
unsigned first_block_in_page; /* doesn't change, Used o...
int boundary; /* prev block is at a boundary */
int reap_counter; /* rate limit reaping */
get_block_t *get_block; /* block mapping function */
-
--[[linux-2.6.33/get_block_t]]
dio_iodone_t *end_io; /* IO completion function */
-
--[[linux-2.6.33/dio_inode_t]]
sector_t final_block_in_bio; /* current final block in ...
sector_t next_block_for_io; /* next block to be put und...
in dio_blocks units */
struct buffer_head map_bh; /* last get_block() result */
-
--[[linux-2.6.33/buffer_head]]
/*
* Deferred addition of a page to the dio. These varia...
* private to dio_send_cur_page(), submit_page_section(...
* dio_bio_add_page().
*/
struct page *cur_page; /* The page */
-
--[[linux-2.6.33/page]]
unsigned cur_page_offset; /* Offset into it, in bytes */
unsigned cur_page_len; /* Nr of bytes at cur_page_offs...
sector_t cur_page_block; /* Where it starts */
/* BIO completion state */
spinlock_t bio_lock; /* protects BIO fields below */
-
--[[linux-2.6.33/spinlock_t]]
unsigned long refcount; /* direct_io_worker() and bios...
struct bio *bio_list; /* singly linked via bi_private */
-
--[[linux-2.6.33/bio]]
struct task_struct *waiter; /* waiting task (NULL if no...
-
--[[linux-2.6.33/task_struct]]
/* AIO related stuff */
struct kiocb *iocb; /* kiocb */
-
--[[linux-2.6.33/kiocb]]
int is_async; /* is IO async ? */
int io_error; /* IO error in completion path */
ssize_t result; /* IO result */
/*
* Page fetching state. These variables belong to dio_r...
*/
int curr_page; /* changes */
int total_pages; /* doesn't change */
unsigned long curr_user_address;/* changes */
/*
* Page queue. These variables belong to dio_refill_pa...
* dio_get_page().
*/
unsigned head; /* next page to process */
unsigned tail; /* last valid page + 1 */
int page_errors; /* errno from get_user_pages() */
/*
* pages[] (and any fields placed after it) are not zer...
* allocation time. Don't add new fields after pages[]...
* wish that they not be zeroed.
*/
struct page *pages[DIO_PAGES]; /* page buffer */
-
--[[linux-2.6.33/page]]
};
*コメント [#o2b0a98c]
終了行:
*参照元 [#h9002b8f]
#backlinks
*説明 [#k6178c22]
-パス: [[linux-2.6.33/fs/direct-io.c]]
-FIXME: これは何?
--説明
**参考 [#u3541e5c]
*実装 [#m5616caa]
/*
* This code generally works in units of "dio_blocks". ...
* somewhere between the hard sector size and the filesy...
* is determined on a per-invocation basis. When talki...
* we need to convert dio_blocks to fs_blocks by scaling...
* down by dio->blkfactor. Similarly, fs-blocksize quan...
* to bio_block quantities by shifting left by blkfactor.
*
* If blkfactor is zero then the user's request was alig...
* blocksize.
*/
struct dio {
/* BIO submission state */
struct bio *bio; /* bio under assembly */
-
--[[linux-2.6.33/bio]]
struct inode *inode;
-
--[[linux-2.6.33/inode]]
int rw;
loff_t i_size; /* i_size when submitted */
-
--[[linux-2.6.33/loff_t]]
int flags; /* doesn't change */
unsigned blkbits; /* doesn't change */
unsigned blkfactor; /* When we're using an alignment w...
is finer than the filesystem's soft
blocksize, this specifies how much
finer. blkfactor=2 means 1/4-block
alignment. Does not change */
unsigned start_zero_done; /* flag: sub-blocksize zeroin...
been performed at the start of a
write */
int pages_in_io; /* approximate total IO pages */
size_t size; /* total request size (doesn't change)*/
sector_t block_in_file; /* Current offset into the und...
file in dio_block units. */
-
--[[linux-2.6.33/sector_t]]
unsigned blocks_available; /* At block_in_file. change...
sector_t final_block_in_request;/* doesn't change */
unsigned first_block_in_page; /* doesn't change, Used o...
int boundary; /* prev block is at a boundary */
int reap_counter; /* rate limit reaping */
get_block_t *get_block; /* block mapping function */
-
--[[linux-2.6.33/get_block_t]]
dio_iodone_t *end_io; /* IO completion function */
-
--[[linux-2.6.33/dio_inode_t]]
sector_t final_block_in_bio; /* current final block in ...
sector_t next_block_for_io; /* next block to be put und...
in dio_blocks units */
struct buffer_head map_bh; /* last get_block() result */
-
--[[linux-2.6.33/buffer_head]]
/*
* Deferred addition of a page to the dio. These varia...
* private to dio_send_cur_page(), submit_page_section(...
* dio_bio_add_page().
*/
struct page *cur_page; /* The page */
-
--[[linux-2.6.33/page]]
unsigned cur_page_offset; /* Offset into it, in bytes */
unsigned cur_page_len; /* Nr of bytes at cur_page_offs...
sector_t cur_page_block; /* Where it starts */
/* BIO completion state */
spinlock_t bio_lock; /* protects BIO fields below */
-
--[[linux-2.6.33/spinlock_t]]
unsigned long refcount; /* direct_io_worker() and bios...
struct bio *bio_list; /* singly linked via bi_private */
-
--[[linux-2.6.33/bio]]
struct task_struct *waiter; /* waiting task (NULL if no...
-
--[[linux-2.6.33/task_struct]]
/* AIO related stuff */
struct kiocb *iocb; /* kiocb */
-
--[[linux-2.6.33/kiocb]]
int is_async; /* is IO async ? */
int io_error; /* IO error in completion path */
ssize_t result; /* IO result */
/*
* Page fetching state. These variables belong to dio_r...
*/
int curr_page; /* changes */
int total_pages; /* doesn't change */
unsigned long curr_user_address;/* changes */
/*
* Page queue. These variables belong to dio_refill_pa...
* dio_get_page().
*/
unsigned head; /* next page to process */
unsigned tail; /* last valid page + 1 */
int page_errors; /* errno from get_user_pages() */
/*
* pages[] (and any fields placed after it) are not zer...
* allocation time. Don't add new fields after pages[]...
* wish that they not be zeroed.
*/
struct page *pages[DIO_PAGES]; /* page buffer */
-
--[[linux-2.6.33/page]]
};
*コメント [#o2b0a98c]
ページ名: