> On Mon, Nov 08, 2004 at 02:15:36PM +0100, Stefan Bader wrote: > > you removed the hook for end_io from the path selector interface. > > Unfortunately I need this > > hook for round-robing path selector. This selector needs to be called for > > every started and > > finished I/O for bookkeeping. This is also a reason that this selector > > should be called every > > time I/O is maped and not only for every n'th I/O. > > Could you please put the end_io hook back into the interface? > > Maybe - but what sort of bookkeeping? > i.e. What information does your PS want at endio time? > [mpio->pgpath plus a success/failure flag?] > How does this interact with what hw_handler is doing? > The PS already gets called the first time there's a failure (fail_path). > Is there a better interface? > If this is purely statistical, would the functionality fit better elsewhere > (e.g. counters in the core)? For the load-balance selector I increment a counter for every I/O sent to that path and decrement that counter for every I/O (regardless whether it completed successfully or not). When choosing a new path it would use the one with the smallest count. So wat I need is the path (You said you wanted to add private pointers to the path structure exported to selectors. That would be VERY helpful to implement this.). To be consistent you could use the path_selector pointer and the path pointer as you do with fail_path and the like. What it also has to do is to set the repeat counter to 1 so it gets called for every I/O to increment correctly. I don't think this could be put into the core because the counter is kept for every single path and the core could only keep them per mapped device. /Stefan Bader