[dm-devel] [PATCH 1/3] dm: a basic support for using the select or poll function
Alasdair G Kergon
agk at redhat.com
Thu May 11 21:50:05 UTC 2017
On Thu, May 11, 2017 at 09:30:43PM +0200, Martin Wilck wrote:
> I see - but I don't see yet how the ioctl approach (or the
> close()/open() based one, for that matter) would avoid this race.
> 1) application processes event N
> 2) event N+1 arrives in the kernel
> 3) user space issues ioctl or close()/open() sequence, N+1 is recorded
> in priv->global_event_nr
> 4) user space runs poll()
> 5) event N+2 arrives 4 weeks later and poll returns
Well that userspace design is obviously not compatible with the set of
patches that has been posted and is not what was proposed in the patch
headers.
Userspace records and compares event numbers.
ARM occurs immediately before LIST. Any userspace processing in response
happens later.
Alasdair
More information about the dm-devel
mailing list