Re: [PATCH V2 3/5] cachefiles: resend an open request if the read request's object is closed

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

 




On 10/14/22 11:07 AM, Jia Zhu wrote:

> +/*
> + * Reopen the closed object with associated read request.

I think "Reopen the closed object if there's any inflight or subsequent
READ request on this object" would be better?

> + * Skip read requests whose related object are reopening.
					       ^
					      is ?


> @@ -277,14 +308,18 @@ ssize_t cachefiles_ondemand_daemon_read(struct cachefiles_cache *cache,
>  	xa_unlock(&cache->reqs);
>  
>  	id = xas.xa_index;
> -	msg->msg_id = id;
>  
>  	if (msg->opcode == CACHEFILES_OP_OPEN) {
>  		ret = cachefiles_ondemand_get_fd(req);
> -		if (ret)
> +		if (ret) {
> +			cachefiles_ondemand_set_object_close(req->object);
>  			goto error;
> +		}
>  	}
>  
> +	msg->msg_id = id;
> +	msg->object_id = req->object->private->ondemand_id;

Since currently msg->object_id is always assigned in
cachefiles_ondemand_daemon_read(), we can remove the assignment in
cachefiles_ondemand_get_fd().


Otherwise LGTM.

Reviewed-by: Jingbo Xu <jefflexu@xxxxxxxxxxxxxxxxx>

-- 
Thanks,
Jingbo



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux