@@ -72,30 +72,30 @@ static int scan_file(const mfs_t * mfs, int * end_index_dst, int block_index, ui
72
72
73
73
int current_block_index = block_index ;
74
74
while (1 ) {
75
- res = conf -> read_block (conf -> cb_ctx , current_block_index );
75
+ res = conf -> read_block (conf -> cb_ctx , current_block_index , mfs -> block_buf );
76
76
if (res ) return res ;
77
77
set_bit (scratch_bit_buf , current_block_index );
78
78
* end_index_dst = current_block_index ;
79
79
80
80
int32_t unoccupied_data_bytes ;
81
- memcpy (& unoccupied_data_bytes , conf -> block_buf + (conf -> block_size - 8 ), 4 );
81
+ memcpy (& unoccupied_data_bytes , mfs -> block_buf + (conf -> block_size - 8 ), 4 );
82
82
bool has_next_block = unoccupied_data_bytes < 0 ;
83
83
uint32_t next_block_or_target_checksum ;
84
- memcpy (& next_block_or_target_checksum , conf -> block_buf + (conf -> block_size - 4 ), 4 );
84
+ memcpy (& next_block_or_target_checksum , mfs -> block_buf + (conf -> block_size - 4 ), 4 );
85
85
if (!has_next_block ) {
86
- running_checksum = checksum_update (running_checksum , conf -> block_buf , conf -> block_size - 4 );
86
+ running_checksum = checksum_update (running_checksum , mfs -> block_buf , conf -> block_size - 4 );
87
87
if (running_checksum != next_block_or_target_checksum ) {
88
88
* end_index_dst = -1 ;
89
89
}
90
90
return 0 ;
91
91
}
92
92
if (next_block_or_target_checksum >= conf -> block_count
93
- || get_bit (conf -> bit_bufs [OCCUPIED_BLOCKS ], next_block_or_target_checksum )
93
+ || get_bit (mfs -> bit_bufs [OCCUPIED_BLOCKS ], next_block_or_target_checksum )
94
94
|| get_bit (scratch_bit_buf , next_block_or_target_checksum )) {
95
95
* end_index_dst = -1 ;
96
96
return 0 ;
97
97
}
98
- running_checksum = checksum_update (running_checksum , conf -> block_buf , conf -> block_size );
98
+ running_checksum = checksum_update (running_checksum , mfs -> block_buf , conf -> block_size );
99
99
current_block_index = next_block_or_target_checksum ;
100
100
}
101
101
}
@@ -106,47 +106,47 @@ static int mount_inner(mfs_t * mfs, int file_initial_idx)
106
106
const mfs_conf_t * conf = mfs -> conf ;
107
107
108
108
int file_end_idx_this ;
109
- res = scan_file (mfs , & file_end_idx_this , file_initial_idx , conf -> bit_bufs [SCRATCH_1 ]);
109
+ res = scan_file (mfs , & file_end_idx_this , file_initial_idx , mfs -> bit_bufs [SCRATCH_1 ]);
110
110
if (res ) return res ;
111
111
if (file_end_idx_this < 0 ) {
112
112
return 0 ;
113
113
}
114
114
115
- res = conf -> read_block (conf -> cb_ctx , file_initial_idx );
115
+ res = conf -> read_block (conf -> cb_ctx , file_initial_idx , mfs -> block_buf );
116
116
if (res ) return res ;
117
117
118
118
uint32_t birthday_this ;
119
- memcpy (& birthday_this , conf -> block_buf , 4 );
119
+ memcpy (& birthday_this , mfs -> block_buf , 4 );
120
120
121
121
int32_t preferred_if_older ;
122
- memcpy (& preferred_if_older , conf -> block_buf + 4 , 4 );
122
+ memcpy (& preferred_if_older , mfs -> block_buf + 4 , 4 );
123
123
if (preferred_if_older < 0 ) {
124
124
goto label_end_success ;
125
125
}
126
126
127
127
int file_end_idx_other ;
128
- res = scan_file (mfs , & file_end_idx_other , preferred_if_older , conf -> bit_bufs [SCRATCH_2 ]);
128
+ res = scan_file (mfs , & file_end_idx_other , preferred_if_older , mfs -> bit_bufs [SCRATCH_2 ]);
129
129
if (res ) return res ;
130
130
if (file_end_idx_other < 0 ) {
131
131
goto label_end_success ;
132
132
}
133
133
134
- res = conf -> read_block (conf -> cb_ctx , preferred_if_older );
134
+ res = conf -> read_block (conf -> cb_ctx , preferred_if_older , mfs -> block_buf );
135
135
if (res ) return res ;
136
136
137
137
uint32_t birthday_other ;
138
- memcpy (& birthday_other , conf -> block_buf , 4 );
138
+ memcpy (& birthday_other , mfs -> block_buf , 4 );
139
139
if (birthday_other <= birthday_this ) {
140
140
return 0 ;
141
141
}
142
142
143
143
label_end_success :
144
144
if (birthday_this > mfs -> youngest ) mfs -> youngest = birthday_this ;
145
- set_bit (conf -> bit_bufs [FILE_START_BLOCKS ], file_initial_idx );
145
+ set_bit (mfs -> bit_bufs [FILE_START_BLOCKS ], file_initial_idx );
146
146
mfs -> file_count += 1 ;
147
147
int bit_buf_len = MFS_BIT_BUF_SIZE_BYTES (conf -> block_count );
148
148
for (int i = 0 ; i < bit_buf_len ; i ++ ) {
149
- conf -> bit_bufs [OCCUPIED_BLOCKS ][i ] |= conf -> bit_bufs [SCRATCH_1 ][i ];
149
+ mfs -> bit_bufs [OCCUPIED_BLOCKS ][i ] |= mfs -> bit_bufs [SCRATCH_1 ][i ];
150
150
}
151
151
return 0 ;
152
152
}
@@ -160,14 +160,25 @@ int mfs_mount(mfs_t * mfs, const mfs_conf_t * conf)
160
160
return MFS_BAD_BLOCK_CONFIG_ERROR ;
161
161
}
162
162
163
+ int bit_buf_size = MFS_BIT_BUF_SIZE_BYTES (conf -> block_count );
164
+
163
165
mfs -> conf = conf ;
166
+
167
+ mfs -> block_buf = conf -> aligned_aux_memory ;
168
+ uint8_t * aux_mem_u8 = conf -> aligned_aux_memory ;
169
+ aux_mem_u8 += conf -> block_size ;
170
+ for (int i = 0 ; i < 4 ; i ++ ) {
171
+ mfs -> bit_bufs [i ] = aux_mem_u8 ;
172
+ aux_mem_u8 += bit_buf_size ;
173
+ }
174
+
164
175
mfs -> file_count = 0 ;
165
176
mfs -> youngest = 0 ;
166
177
mfs -> open_file_mode = -1 ;
167
178
mfs -> needs_remount = false;
168
179
169
- memset (conf -> bit_bufs [FILE_START_BLOCKS ], 0 , MFS_BIT_BUF_SIZE_BYTES ( conf -> block_count ) );
170
- memset (conf -> bit_bufs [OCCUPIED_BLOCKS ], 0 , MFS_BIT_BUF_SIZE_BYTES ( conf -> block_count ) );
180
+ memset (mfs -> bit_bufs [FILE_START_BLOCKS ], 0 , bit_buf_size );
181
+ memset (mfs -> bit_bufs [OCCUPIED_BLOCKS ], 0 , bit_buf_size );
171
182
172
183
for (int file_initial_idx = 0 ; file_initial_idx < conf -> block_count ; file_initial_idx ++ ) {
173
184
res = mount_inner (mfs , file_initial_idx );
@@ -208,12 +219,12 @@ int mfs_list_files(mfs_t * mfs, void * list_file_cb_ctx, void (*list_file_cb)(vo
208
219
209
220
int files_left = mfs -> file_count ;
210
221
for (int i = 0 ; files_left ; i ++ ) {
211
- if (!get_bit (conf -> bit_bufs [FILE_START_BLOCKS ], i )) {
222
+ if (!get_bit (mfs -> bit_bufs [FILE_START_BLOCKS ], i )) {
212
223
continue ;
213
224
}
214
- res = conf -> read_block (conf -> cb_ctx , i );
225
+ res = conf -> read_block (conf -> cb_ctx , i , mfs -> block_buf );
215
226
if (res ) return res ;
216
- list_file_cb (list_file_cb_ctx , (char * ) conf -> block_buf + 8 );
227
+ list_file_cb (list_file_cb_ctx , (char * ) mfs -> block_buf + 8 );
217
228
files_left -- ;
218
229
}
219
230
@@ -243,13 +254,13 @@ int mfs_delete(mfs_t * mfs, const char * name)
243
254
244
255
int files_left = mfs -> file_count ;
245
256
for (i = 0 ; files_left ; i ++ ) {
246
- if (!get_bit (conf -> bit_bufs [FILE_START_BLOCKS ], i )) {
257
+ if (!get_bit (mfs -> bit_bufs [FILE_START_BLOCKS ], i )) {
247
258
continue ;
248
259
}
249
- res = conf -> read_block (conf -> cb_ctx , i );
260
+ res = conf -> read_block (conf -> cb_ctx , i , mfs -> block_buf );
250
261
if (res ) return res ;
251
262
252
- if (0 == strcmp (name , (char * ) conf -> block_buf + 8 )) {
263
+ if (0 == strcmp (name , (char * ) mfs -> block_buf + 8 )) {
253
264
break ;
254
265
}
255
266
@@ -261,30 +272,30 @@ int mfs_delete(mfs_t * mfs, const char * name)
261
272
}
262
273
int delete_file_page_1 = i ;
263
274
264
- clear_bit (conf -> bit_bufs [FILE_START_BLOCKS ], delete_file_page_1 );
275
+ clear_bit (mfs -> bit_bufs [FILE_START_BLOCKS ], delete_file_page_1 );
265
276
266
277
uint32_t birthday ;
267
- memcpy (& birthday , conf -> block_buf , 4 );
278
+ memcpy (& birthday , mfs -> block_buf , 4 );
268
279
if (birthday == mfs -> youngest ) mfs -> youngest -- ;
269
280
270
281
int end_idx ;
271
- res = scan_file (mfs , & end_idx , delete_file_page_1 , conf -> bit_bufs [SCRATCH_1 ]);
282
+ res = scan_file (mfs , & end_idx , delete_file_page_1 , mfs -> bit_bufs [SCRATCH_1 ]);
272
283
if (res ) SET_NEEDS_REMOUNT_THEN_RETURN (mfs , res );
273
284
if (end_idx < 0 ) SET_NEEDS_REMOUNT_THEN_RETURN (mfs , MFS_INTERNAL_ASSERTION_ERROR );
274
285
275
286
int bit_buf_len = MFS_BIT_BUF_SIZE_BYTES (conf -> block_count );
276
287
for (i = 0 ; i < bit_buf_len ; i ++ ) {
277
- conf -> bit_bufs [OCCUPIED_BLOCKS ][i ] &= ~conf -> bit_bufs [SCRATCH_1 ][i ];
288
+ mfs -> bit_bufs [OCCUPIED_BLOCKS ][i ] &= ~mfs -> bit_bufs [SCRATCH_1 ][i ];
278
289
}
279
290
280
291
/* clobber the first page */
281
- memset (conf -> block_buf , 0xff , conf -> block_size );
282
- res = conf -> write_block (conf -> cb_ctx , delete_file_page_1 );
292
+ memset (mfs -> block_buf , 0xff , conf -> block_size );
293
+ res = conf -> write_block (conf -> cb_ctx , delete_file_page_1 , mfs -> block_buf );
283
294
if (res ) SET_NEEDS_REMOUNT_THEN_RETURN (mfs , res );
284
- res = conf -> read_block (conf -> cb_ctx , delete_file_page_1 );
295
+ res = conf -> read_block (conf -> cb_ctx , delete_file_page_1 , mfs -> block_buf );
285
296
if (res ) SET_NEEDS_REMOUNT_THEN_RETURN (mfs , res );
286
297
for (i = 0 ; i < conf -> block_size ; i ++ ) {
287
- if (conf -> block_buf [i ] != 0xff ) SET_NEEDS_REMOUNT_THEN_RETURN (mfs , MFS_READBACK_ERROR );
298
+ if (mfs -> block_buf [i ] != 0xff ) SET_NEEDS_REMOUNT_THEN_RETURN (mfs , MFS_READBACK_ERROR );
288
299
}
289
300
290
301
mfs -> file_count -= 1 ;
@@ -315,13 +326,13 @@ int mfs_open(mfs_t * mfs, const char * name, mfs_mode_t mode)
315
326
316
327
int files_left = mfs -> file_count ;
317
328
for (i = 0 ; files_left ; i ++ ) {
318
- if (!get_bit (conf -> bit_bufs [FILE_START_BLOCKS ], i )) {
329
+ if (!get_bit (mfs -> bit_bufs [FILE_START_BLOCKS ], i )) {
319
330
continue ;
320
331
}
321
- res = conf -> read_block (conf -> cb_ctx , i );
332
+ res = conf -> read_block (conf -> cb_ctx , i , mfs -> block_buf );
322
333
if (res ) return res ;
323
334
324
- if (0 == strcmp (name , (char * ) conf -> block_buf + 8 )) {
335
+ if (0 == strcmp (name , (char * ) mfs -> block_buf + 8 )) {
325
336
break ;
326
337
}
327
338
@@ -336,21 +347,21 @@ int mfs_open(mfs_t * mfs, const char * name, mfs_mode_t mode)
336
347
else {
337
348
mfs -> open_file_match_index = files_left ? i : -1 ;
338
349
for (i = 0 ; i < conf -> block_count ; i ++ ) {
339
- if (!get_bit (conf -> bit_bufs [OCCUPIED_BLOCKS ], i )) break ;
350
+ if (!get_bit (mfs -> bit_bufs [OCCUPIED_BLOCKS ], i )) break ;
340
351
}
341
352
if (i == conf -> block_count ) {
342
353
return MFS_NO_SPACE_ERROR ;
343
354
}
344
- set_bit (conf -> bit_bufs [OCCUPIED_BLOCKS ], i );
345
- set_bit (conf -> bit_bufs [FILE_START_BLOCKS ], i );
355
+ set_bit (mfs -> bit_bufs [OCCUPIED_BLOCKS ], i );
356
+ set_bit (mfs -> bit_bufs [FILE_START_BLOCKS ], i );
346
357
if (mfs -> youngest == UINT32_MAX ) {
347
358
SET_NEEDS_REMOUNT_THEN_RETURN (mfs , MFS_BIRTHDAY_LIMIT_REACHED_ERROR );
348
359
}
349
360
mfs -> youngest += 1 ;
350
- memcpy (conf -> block_buf , & mfs -> youngest , 4 );
351
- memcpy (conf -> block_buf + 4 , & mfs -> open_file_match_index , 4 );
352
- strcpy ((char * ) conf -> block_buf + 8 , name );
353
- mfs -> writer_checksum = checksum_update (CHECKSUM_INIT_VAL , conf -> block_buf , 8 + name_len + 1 );
361
+ memcpy (mfs -> block_buf , & mfs -> youngest , 4 );
362
+ memcpy (mfs -> block_buf + 4 , & mfs -> open_file_match_index , 4 );
363
+ strcpy ((char * ) mfs -> block_buf + 8 , name );
364
+ mfs -> writer_checksum = checksum_update (CHECKSUM_INIT_VAL , mfs -> block_buf , 8 + name_len + 1 );
354
365
mfs -> open_file_block = i ;
355
366
mfs -> open_file_first_block = i ;
356
367
}
@@ -377,7 +388,7 @@ int mfs_read(mfs_t * mfs, uint8_t * dst, int size)
377
388
378
389
while (size ) {
379
390
int32_t unoccupied_data_bytes ;
380
- memcpy (& unoccupied_data_bytes , conf -> block_buf + (conf -> block_size - 8 ), 4 );
391
+ memcpy (& unoccupied_data_bytes , mfs -> block_buf + (conf -> block_size - 8 ), 4 );
381
392
bool has_next_block = unoccupied_data_bytes < 0 ;
382
393
if (has_next_block ) unoccupied_data_bytes = 0 ;
383
394
@@ -389,21 +400,21 @@ int mfs_read(mfs_t * mfs, uint8_t * dst, int size)
389
400
}
390
401
391
402
uint32_t new_block_idx ;
392
- memcpy (& new_block_idx , conf -> block_buf + (conf -> block_size - 4 ), 4 );
403
+ memcpy (& new_block_idx , mfs -> block_buf + (conf -> block_size - 4 ), 4 );
393
404
394
- res = conf -> read_block (conf -> cb_ctx , new_block_idx );
405
+ res = conf -> read_block (conf -> cb_ctx , new_block_idx , mfs -> block_buf );
395
406
if (res ) SET_FILE_CLOSED_THEN_RETURN (mfs , res );
396
407
397
408
mfs -> open_file_block_cursor = 0 ;
398
409
399
- memcpy (& unoccupied_data_bytes , conf -> block_buf + (conf -> block_size - 8 ), 4 );
410
+ memcpy (& unoccupied_data_bytes , mfs -> block_buf + (conf -> block_size - 8 ), 4 );
400
411
if (unoccupied_data_bytes < 0 ) unoccupied_data_bytes = 0 ;
401
412
block_len_remaining = conf -> block_size - unoccupied_data_bytes - 8 ;
402
413
}
403
414
404
415
int copy_amount = block_len_remaining < size ? block_len_remaining : size ;
405
416
406
- memcpy (dst , & conf -> block_buf [mfs -> open_file_block_cursor ], copy_amount );
417
+ memcpy (dst , & mfs -> block_buf [mfs -> open_file_block_cursor ], copy_amount );
407
418
408
419
size -= copy_amount ;
409
420
dst += copy_amount ;
@@ -433,19 +444,19 @@ int mfs_write(mfs_t * mfs, const uint8_t * src, int size)
433
444
if (!block_len_remaining ) {
434
445
uint32_t i ;
435
446
for (i = 0 ; i < conf -> block_count ; i ++ ) {
436
- if (!get_bit (conf -> bit_bufs [OCCUPIED_BLOCKS ], i )) break ;
447
+ if (!get_bit (mfs -> bit_bufs [OCCUPIED_BLOCKS ], i )) break ;
437
448
}
438
449
if (i == conf -> block_count ) {
439
450
SET_NEEDS_REMOUNT_THEN_RETURN (mfs , MFS_NO_SPACE_ERROR );
440
451
}
441
- set_bit (conf -> bit_bufs [OCCUPIED_BLOCKS ], i );
452
+ set_bit (mfs -> bit_bufs [OCCUPIED_BLOCKS ], i );
442
453
443
454
int32_t unoccupied_data_bytes = -1 ;
444
- memcpy (conf -> block_buf + (conf -> block_size - 8 ), & unoccupied_data_bytes , 4 );
445
- memcpy (conf -> block_buf + (conf -> block_size - 4 ), & i , 4 );
446
- mfs -> writer_checksum = checksum_update (mfs -> writer_checksum , conf -> block_buf + (conf -> block_size - 8 ), 8 );
455
+ memcpy (mfs -> block_buf + (conf -> block_size - 8 ), & unoccupied_data_bytes , 4 );
456
+ memcpy (mfs -> block_buf + (conf -> block_size - 4 ), & i , 4 );
457
+ mfs -> writer_checksum = checksum_update (mfs -> writer_checksum , mfs -> block_buf + (conf -> block_size - 8 ), 8 );
447
458
448
- res = conf -> write_block (conf -> cb_ctx , mfs -> open_file_block );
459
+ res = conf -> write_block (conf -> cb_ctx , mfs -> open_file_block , mfs -> block_buf );
449
460
if (res ) SET_NEEDS_REMOUNT_THEN_RETURN (mfs , res );
450
461
451
462
mfs -> open_file_block_cursor = 0 ;
@@ -456,7 +467,7 @@ int mfs_write(mfs_t * mfs, const uint8_t * src, int size)
456
467
int copy_amount = block_len_remaining < write_size_left ? block_len_remaining : write_size_left ;
457
468
458
469
mfs -> writer_checksum = checksum_update (mfs -> writer_checksum , src , copy_amount );
459
- memcpy (conf -> block_buf + mfs -> open_file_block_cursor , src , copy_amount );
470
+ memcpy (mfs -> block_buf + mfs -> open_file_block_cursor , src , copy_amount );
460
471
461
472
write_size_left -= copy_amount ;
462
473
src += copy_amount ;
@@ -479,38 +490,38 @@ int mfs_close(mfs_t * mfs)
479
490
480
491
if (mfs -> open_file_mode == MFS_MODE_WRITE ) {
481
492
int32_t unoccupied_data_bytes = conf -> block_size - mfs -> open_file_block_cursor - 8 ;
482
- memset (conf -> block_buf + mfs -> open_file_block_cursor , 0xff , unoccupied_data_bytes );
483
- memcpy (conf -> block_buf + (conf -> block_size - 8 ), & unoccupied_data_bytes , 4 );
484
- mfs -> writer_checksum = checksum_update (mfs -> writer_checksum , conf -> block_buf + mfs -> open_file_block_cursor , unoccupied_data_bytes + 4 );
485
- memcpy (conf -> block_buf + (conf -> block_size - 4 ), & mfs -> writer_checksum , 4 );
493
+ memset (mfs -> block_buf + mfs -> open_file_block_cursor , 0xff , unoccupied_data_bytes );
494
+ memcpy (mfs -> block_buf + (conf -> block_size - 8 ), & unoccupied_data_bytes , 4 );
495
+ mfs -> writer_checksum = checksum_update (mfs -> writer_checksum , mfs -> block_buf + mfs -> open_file_block_cursor , unoccupied_data_bytes + 4 );
496
+ memcpy (mfs -> block_buf + (conf -> block_size - 4 ), & mfs -> writer_checksum , 4 );
486
497
487
- res = conf -> write_block (conf -> cb_ctx , mfs -> open_file_block );
498
+ res = conf -> write_block (conf -> cb_ctx , mfs -> open_file_block , mfs -> block_buf );
488
499
if (res ) SET_NEEDS_REMOUNT_THEN_RETURN (mfs , res );
489
500
490
501
int end_index ;
491
- res = scan_file (mfs , & end_index , mfs -> open_file_first_block , conf -> bit_bufs [SCRATCH_1 ]);
502
+ res = scan_file (mfs , & end_index , mfs -> open_file_first_block , mfs -> bit_bufs [SCRATCH_1 ]);
492
503
if (res ) SET_NEEDS_REMOUNT_THEN_RETURN (mfs , res );
493
504
494
505
if (mfs -> open_file_match_index != -1 ) {
495
- clear_bit (conf -> bit_bufs [FILE_START_BLOCKS ], mfs -> open_file_match_index );
506
+ clear_bit (mfs -> bit_bufs [FILE_START_BLOCKS ], mfs -> open_file_match_index );
496
507
497
- res = scan_file (mfs , & end_index , mfs -> open_file_match_index , conf -> bit_bufs [SCRATCH_1 ]);
508
+ res = scan_file (mfs , & end_index , mfs -> open_file_match_index , mfs -> bit_bufs [SCRATCH_1 ]);
498
509
if (res ) SET_NEEDS_REMOUNT_THEN_RETURN (mfs , res );
499
510
if (end_index < 0 ) SET_NEEDS_REMOUNT_THEN_RETURN (mfs , MFS_INTERNAL_ASSERTION_ERROR );
500
511
501
512
int bit_buf_len = MFS_BIT_BUF_SIZE_BYTES (conf -> block_count );
502
513
for (int i = 0 ; i < bit_buf_len ; i ++ ) {
503
- conf -> bit_bufs [OCCUPIED_BLOCKS ][i ] &= ~conf -> bit_bufs [SCRATCH_1 ][i ];
514
+ mfs -> bit_bufs [OCCUPIED_BLOCKS ][i ] &= ~mfs -> bit_bufs [SCRATCH_1 ][i ];
504
515
}
505
516
506
517
/* clobber the first page */
507
- memset (conf -> block_buf , 0xff , conf -> block_size );
508
- res = conf -> write_block (conf -> cb_ctx , mfs -> open_file_match_index );
518
+ memset (mfs -> block_buf , 0xff , conf -> block_size );
519
+ res = conf -> write_block (conf -> cb_ctx , mfs -> open_file_match_index , mfs -> block_buf );
509
520
if (res ) SET_NEEDS_REMOUNT_THEN_RETURN (mfs , res );
510
- res = conf -> read_block (conf -> cb_ctx , mfs -> open_file_match_index );
521
+ res = conf -> read_block (conf -> cb_ctx , mfs -> open_file_match_index , mfs -> block_buf );
511
522
if (res ) SET_NEEDS_REMOUNT_THEN_RETURN (mfs , res );
512
523
for (int i = 0 ; i < conf -> block_size ; i ++ ) {
513
- if (conf -> block_buf [i ] != 0xff ) SET_NEEDS_REMOUNT_THEN_RETURN (mfs , MFS_READBACK_ERROR );
524
+ if (mfs -> block_buf [i ] != 0xff ) SET_NEEDS_REMOUNT_THEN_RETURN (mfs , MFS_READBACK_ERROR );
514
525
}
515
526
}
516
527
else {
0 commit comments