[Ocfs2-tools-devel] [PATCH 5/6] Resend: Add unwritten extent support in ocfs2-tools, take 2

tao.ma tao.ma at oracle.com
Wed Sep 26 17:11:00 PDT 2007


Mark Fasheh wrote:
> On Wed, Sep 26, 2007 at 01:15:40PM +0800, tao.ma wrote:
>   
>> Resend it and Modify 2 things:
>> 1. include 1 bug fix of block allocation.
>> 2. Reorganize ocfs2_sync_path_to_disk to be more readable and efficient.
>>     
>
>
> One more comment which I forgot to add:
>
>   
>> +errcode_t ocfs2_allocate_unwritten_extents(ocfs2_filesys *fs, uint64_t ino,
>> +					   uint64_t offset, uint64_t len)
>> +{
>> +	errcode_t ret = 0;
>> +	uint32_t n_clusters = 0, cpos;
>> +	uint64_t p_blkno, v_blkno, v_end, contig_blocks, wanted_blocks;
>> +	ocfs2_cached_inode *ci = NULL;
>> +
>> +	if (!(fs->fs_flags & OCFS2_FLAG_RW))
>> +		return OCFS2_ET_RO_FILESYS;
>> +
>> +	if (!ocfs2_writes_unwritten_extents(OCFS2_RAW_SB(fs->fs_super)))
>> +		return OCFS2_ET_UNSUPP_FEATURE;
>> +
>> +	ret = ocfs2_read_cached_inode(fs, ino, &ci);
>> +	if (ret)
>> +		goto out;
>>     
>
> This function should verify that the inode is a regular file and not a
> directory, block device inode, etc, etc.
> 	--Mark
>   
Yeah, you are right. I will add it.



More information about the Ocfs2-tools-devel mailing list