Re: [PATCH 1/6] f2fs: support in batch multi blocks preallocation

From: Jaegeuk Kim
Date: Tue May 10 2016 - 17:41:38 EST


> > valid_block_count =
> > - sbi->total_valid_block_count + (block_t)count;
> > + sbi->total_valid_block_count + (block_t)(*count);
> > if (unlikely(valid_block_count > sbi->user_block_count)) {
> > - spin_unlock(&sbi->stat_lock);
> > - return false;
> > + *count = sbi->user_block_count - sbi->total_valid_block_count;
> > + if (!*count) {
> > + spin_unlock(&sbi->stat_lock);
> > + return false;
> > + }
>
> If we can only allocate partial blocks, we should let f2fs_map_blocks being
> ware of that, otherwise, map->m_len will be updated incorrectly.

Hmm, I've reworked this patch.
Can you review this?

Thanks,