aboutsummaryrefslogtreecommitdiff
path: root/lib/netdev-notifier-error-inject.c
diff options
context:
space:
mode:
authorChao Yu <[email protected]>2015-09-18 16:51:51 +0800
committerJaegeuk Kim <[email protected]>2015-10-09 16:20:51 -0700
commit973163fc0ce07761eae671e895dc6747a3410fe7 (patch)
tree5485524e6202dff461af64a0a25ef6e21eff22e7 /lib/netdev-notifier-error-inject.c
parent514053e4543b33bbd74d8900f368df663cb03325 (diff)
f2fs: reorganize f2fs_map_blocks
In this patch, we try to reorganize f2fs_map_blocks to make block mapping flow more clear by using following structure: /* check status of mapping */ if (unmapped) { /* blkaddr == NULL_ADDR || blkaddr == NEW_ADDR */ if (create) { /* write path, handle dio write case here */ alloc_and_map; } else { /* * handle read cases from all call paths: * 1. generic read; * 2. dio read; * 3. fiemap; * 4. bmap */ } } /* map buffer_header */ Besides, this patch handles the missing case correctly for dio write: When we fail in __allocate_data_blocks, then in f2fs_map_blocks, we will not allocate blocks correctly for preallocated blocks, but returning with an unmapped buffer head, which will result in failure of dio write. Signed-off-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
Diffstat (limited to 'lib/netdev-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions