Re: [PATCH 2/2] f2fs: introduce readahead mode of node pages
From: Namjae Jeon
Date: Tue Feb 26 2013 - 20:41:24 EST
2013/2/27, Jaegeuk Kim <jaegeuk.kim@xxxxxxxxxxx>:
> 2013-02-26 (í), 20:52 +0900, Namjae Jeon:
>> > @@ -434,7 +434,7 @@ int get_dnode_of_data(struct dnode_of_data *dn,
>> > pgoff_t
>> > index, int ro)
>> > alloc_nid_done(sbi, nids[i]);
>> > mutex_unlock_op(sbi, NODE_NEW);
>> > done = true;
>> > - } else if (ro && i == level && level > 1) {
>> > + } else if (mode == LOOKUP_NODE_RA && i == level && level > 1) {
>> > npage[i] = get_node_page_ra(parent, offset[i - 1]);
>> > if (IS_ERR(npage[i])) {
>> > err = PTR_ERR(npage[i]);
>>
>> Hi Jaegeuk.
>> There is no LOOKUP_NODE usage in this patch.
>> I think that we can use LOOKUP_NODE flag instead of done(bool) like
>> this.
>> if (mode == LOOKUP_NODE)
>
> Hi.
> In order to do that, we should check additional conditions like i and
> level together with mode == LOOKUP_NODE.
> So, I'm not sure how much it makes clearer by using LOOKUP_NODE
> explicitly.
> It seems fine to me, since we can just use LOOKUP_NODE to distinguish it
> from the other modes.
> Any thought?
I agree. And It does really need additional condition.
So Rather, It can make more complicated If using LOOKUP_NODE.
Looks reasonable to me on current change.
Reviewed-by: Namjae Jeon <namjae.jeon@xxxxxxxxxxx>
Thanks!
>
> --
> Jaegeuk Kim
> Samsung
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/