On 04/18/2013 03:37 PM, Stefan Hajnoczi wrote: >> @@ -184,6 +186,8 @@ typedef struct SheepdogInode { >> > uint32_t data_vdi_id[MAX_DATA_OBJS]; >> > } SheepdogInode; >> > >> > +static bool discard_supported = true; > Normally state should be part of BDRVSheepdogState so that it does not > affect other sheepdog drives. > > Please confirm that all -drive file=sheepdog:... must either support > discard or not support it. I asked this in an older version of the > patch but wasn't sure if my question was clear. >
Ah, I see, this time I got your question clearly. > Imagine a scenario where you run two sheepdog clusters and want to > connect one drive from each cluster to your VM. If one cluster uses > outdated sheepdog software but the other is up-to-date, then it should > still be possible to use discard on the up-to-date cluster. Makes sense. I'll use a per structure enabler. Thanks, Yuan