Re: [PATCH 03/16] SQUASHME pnfs-submit embed pnfs_layout_type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/12/2010 08:34 PM, William A. (Andy) Adamson wrote:
> On Mon, Jul 12, 2010 at 12:29 PM, Boaz Harrosh <bharrosh@xxxxxxxxxxx> wrote:
>>>  static inline bool
>>>  layoutcommit_needed(struct nfs_inode *nfsi)
>>>  {
>>> -     return test_bit(NFS_INO_LAYOUTCOMMIT, &nfsi->layout.pnfs_layout_state);
>>> +     return has_layout(nfsi) &&
>>> +            test_bit(NFS_INO_LAYOUTCOMMIT, &nfsi->layout->pnfs_layout_state);
>>
>> What is the purpose of patch[1/1] ?
> 
> To not segfault when the nfs_inode->layout field is NULL.
> 

Yes that is this patch [3/16]. 

I was asking about [PATCH 01/16] that changed it to a state_bit from lo_cred
why do we need that one. Now that you proved that has_layout(nfsi) cannot become
negative on us while asking?

>>
>> you are unlocked and asking about a layout pointer. Which according to you might
>> go away mid-flight?
> 
> No, it simply has not been allocated. The pnfs_layout_type reference
> counting will be done under the inode->i_lock and all in-flight RPC's
> will hold a reference, so there is no reason to hold a lock to call
> has_layout().
> 

I agree it is safe.

Boaz

> -->Andy
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux