" From the documentation of IRP_MJ_CLEANUP, it is not clear if there's a 
'guarantee' that the file object would not be used anymore while IRP_MJ_CLEANUP 
cleanup is being called. One way to handle this is to sychronize using a lock 
like we do for an event queue or the packet queue in the OVS descriptor 
instance. Another way is to get rid of the pointer, and add a boolean to check 
if the state is valid or not. I'll send out a patch with the latter approach. 
It seems simpler."

Yes, storing per instance state in the instance itself does simplify the code a 
lot (no lock should be used).
Eitan

-----Original Message-----
From: dev [mailto:dev-boun...@openvswitch.org] On Behalf Of Nithin Raju
Sent: Monday, September 15, 2014 8:09 AM
To: Samuel Ghinet
Cc: dev@openvswitch.org
Subject: Re: [ovs-dev] [PATCH] datapath-windows: cleanup dump state during 
instance cleanup


On Sep 14, 2014, at 7:38 PM, Samuel Ghinet <sghi...@cloudbasesolutions.com> 
wrote:

> I meant in the sense, if it is necessary. AFAIK, the IO pending can only 
> happen in non-dump operations (and here, non-dump netlink pids).
> Therefore, I don't know if it is really useful to FreeDumpState in a pending 
> IO cancel callback function. Perhaps an ASSERT to make sure the dump state is 
> empty, instead?

As I mentioned earlier, I was trying to handle the case user-mode process 
closed the handle eg. if it crashed while in the middle of a dump operation.

>From the documentation of IRP_MJ_CLEANUP, it is not clear if there's a 
>'guarantee' that the file object would not be used anymore while 
>IRP_MJ_CLEANUP cleanup is being called. One way to handle this is to 
>sychronize using a lock like we do for an event queue or the packet queue in 
>the OVS descriptor instance. Another way is to get rid of the pointer, and add 
>a boolean to check if the state is valid or not. I'll send out a patch with 
>the latter approach. It seems simpler.

Thanks,
-- Nithin

_______________________________________________
dev mailing list
dev@openvswitch.org
https://urldefense.proofpoint.com/v1/url?u=http://openvswitch.org/mailman/listinfo/dev&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=yTvML8OxA42Jb6ViHe7fUXbvPVOYDPVq87w43doxtlY%3D%0A&m=ALGwLF3QELwHFrO1OEPx7Mf6BMq1C2lxrI6sJwCVAVk%3D%0A&s=dfce865a908d55ee2f5ac76694887c5736c546b1506eac91c0f919a16fc4ed66
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to