MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / ll_rw_block

Function ll_rw_block

Ext4Fsd/linux.c:844–872  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

842}
843
844void ll_rw_block(int rw, int nr, struct buffer_head * bhs[])
845{
846 int i;
847
848 for (i = 0; i < nr; i++) {
849
850 struct buffer_head *bh = bhs[i];
851
852 if (rw == SWRITE)
853 lock_buffer(bh);
854 else if (test_set_buffer_locked(bh))
855 continue;
856
857 if (rw == WRITE || rw == SWRITE) {
858 if (test_clear_buffer_dirty(bh)) {
859 get_bh(bh);
860 submit_bh(WRITE, bh);
861 continue;
862 }
863 } else {
864 if (!buffer_uptodate(bh)) {
865 get_bh(bh);
866 submit_bh(rw, bh);
867 continue;
868 }
869 }
870 unlock_buffer(bh);
871 }
872}
873
874int bh_submit_read(struct buffer_head *bh)
875{

Callers 8

__brelseFunction · 0.85
bh_submit_readFunction · 0.85
flush_descriptorFunction · 0.85
do_readaheadFunction · 0.85
journal_get_superblockFunction · 0.85
do_readaheadFunction · 0.85
journal_get_superblockFunction · 0.85

Calls 4

lock_bufferFunction · 0.85
get_bhFunction · 0.85
submit_bhFunction · 0.85
unlock_bufferFunction · 0.85

Tested by

no test coverage detected