[Ocfs2-tools-devel] [PATCH 2/3] indexed-dir: code clean up.

Tao Ma tao.ma at oracle.com
Mon May 17 17:06:24 PDT 2010


Sunil Mushran wrote:
> Shouldn't it be PRIu64 in tools?
oh, yes. we use llu in the kernel. Attached is the updated one.

Regards,
Tao
>
> On 05/11/2010 12:05 AM, Tao Ma wrote:
>> 1. remove unused 'out'.
>> 2. change some '%lu' to '%llu' for uint64_t.
>>
>> Signed-off-by: Tao Ma<tao.ma at oracle.com>
>> ---
>>   libocfs2/dir_indexed.c              |    1 -
>>   tunefs.ocfs2/feature_indexed_dirs.c |    6 +++---
>>   2 files changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/libocfs2/dir_indexed.c b/libocfs2/dir_indexed.c
>> index 228757f..89f14ee 100644
>> --- a/libocfs2/dir_indexed.c
>> +++ b/libocfs2/dir_indexed.c
>> @@ -157,7 +157,6 @@ next:
>>           offset += dirent->rec_len;
>>       }
>>
>> -out:
>>       return ret;
>>   }
>>
>> diff --git a/tunefs.ocfs2/feature_indexed_dirs.c 
>> b/tunefs.ocfs2/feature_indexed_dirs.c
>> index c26780e..ffb42e4 100644
>> --- a/tunefs.ocfs2/feature_indexed_dirs.c
>> +++ b/tunefs.ocfs2/feature_indexed_dirs.c
>> @@ -192,7 +192,7 @@ static errcode_t find_indexed_dirs(ocfs2_filesys 
>> *fs,
>>       }
>>
>>       verbosef(VL_APP,
>> -        "We have %lu indexed %s to truncate.\n",
>> +        "We have %llu indexed %s to truncate.\n",
>>           ctxt->dx_dirs_nr,
>>           (ctxt->dx_dirs_nr>  1)?"directories":"directory");
>>
>> @@ -225,7 +225,7 @@ static errcode_t clean_indexed_dirs(ocfs2_filesys 
>> *fs,
>>           ret = ocfs2_dx_dir_truncate(fs, dx_di->ino);
>>           if (ret) {
>>               verbosef(VL_APP,
>> -                "Truncate directory (ino \"%lu\") failed.",
>> +                "Truncate directory (ino \"%llu\") failed.",
>>                   dx_di->ino);
>>               ret = TUNEFS_ET_DX_DIRS_TRUNCATE_FAILED;
>>               goto bail;
>> @@ -237,7 +237,7 @@ static errcode_t clean_indexed_dirs(ocfs2_filesys 
>> *fs,
>>   bail:
>>       tools_progress_stop(prog);
>>       verbosef(VL_APP,
>> -        "\"%lu\" from \"%lu\" indexed %s truncated.",
>> +        "\"%llu\" from \"%llu\" indexed %s truncated.",
>>           dirs_truncated, ctxt->dx_dirs_nr,
>>           (dirs_truncated<= 1) ? "directory is" : "directories are");
>>
>>    
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-indexed-dir-code-clean-up.patch
Type: text/x-patch
Size: 1854 bytes
Desc: not available
Url : http://oss.oracle.com/pipermail/ocfs2-tools-devel/attachments/20100518/45757c11/attachment.bin 


More information about the Ocfs2-tools-devel mailing list