lxc-destroy: actually work if underlying fs is overlayfs
lxc-destroy: actually work if underlying fs is overlayfs

One of the 'features' of overlayfs is that depending on whether a file
is on the upper or lower dir you get back a different device from stat.
That breaks our lxc_rmdir_onedev.

So at lxc_rmdir_ondev check the device of the directory being deleted.
If it is overlayfs, then skip the device check.

Note this is unrelated to overlayfs snapshots - in those cases when you
delete a container, /var/lib/lxc/$container/ does not actually have an
overlayfs under it.  Rather, to reproduce this you would

sudo mkdir /opt/{lower,upper,workdir}
sudo mount -t overlayfs -o lower=/opt/lower,upper=/opt/upper,workdir=/opt/workdir \
	lxc /var/lib/lxc
sudo lxc-create -t download -n c1 -- -d ubuntu -r trusty -a amd64
sudo lxc-destroy -n c1

Signed-off-by: Serge Hallyn <3df611b026e4639bee8aef7a4beb2e39fcebb313@ubuntu.com>
Tested-by: Marko Ratkaj <3cd3f32f24caf069dd61ee91510cb00192f77ee3@sartura.hr>
Acked-by: Stéphane Graber <089afc6d81f66f1168a9849e15660feae286e024@ubuntu.com>

ysbnim/lxc,akshaykarle/lxc,bmoar/lxc,ksperis/lxc,JohnPeacockMessageSystems/lxc,hfuCN/lxc,caglar10ur/lxc,sapun/lxc,thmo/lxc,ysbnim/lxc,hkjolhede/lxc,bostjan/lxc,virajs/lxc,QingweiPeterLan/cs188-lxc,yubo/lxc,szaszg/lxc,hkjolhede/lxc,hallyn/lxc,ecarrara/lxc,virajs/lxc,rldleblanc/lxc,terceiro/lxc,federicobriata/lxc,LynxChaus/lxc,Distrotech/lxc,akshaykarle/lxc,GreatFruitOmsk/lxc,LynxChaus/lxc,ecarrara/lxc,hallyn/lxc,GreatFruitOmsk/lxc,lisongmin/lxc,terceiro/lxc,hfuCN/lxc,armcc/lxc,ioops/lxc,fwilson42/lxc,DarknessBeforeDawn/lxc,tych0/lxc,rowhit/lxc,major/lxc,LynxChaus/lxc,lazy404/lxc,ss1h2a3tw/lxc,aeris/lxc,raspberrypython/lxc,sapun/lxc,ksperis/lxc,tych0/lxc,szaszg/lxc,codebauss/lxc,codebauss/lxc,cjwatson/lxc,hfuCN/lxc,Ponce/lxc,DarknessBeforeDawn/lxc,lazy404/lxc,raspberrypython/lxc,QingweiPeterLan/cs188-lxc,caglar10ur/lxc,major/lxc,Distrotech/lxc,ksperis/lxc,codebauss/lxc,sapun/lxc,lazy404/lxc,jirislaby/lxc,ecarrara/lxc,hallyn/lxc,yubo/lxc,lisongmin/lxc,rldleblanc/lxc,Pelagicore/lxc,bostjan/lxc,yubo/lxc,ss1h2a3tw/lxc,Ponce/lxc,cjwatson/lxc,Pelagicore/lxc,ioops/lxc,Pelagicore/lxc,rldleblanc/lxc,bmoar/lxc,ss1h2a3tw/lxc,armcc/lxc,bmoar/lxc,aeris/lxc,Distrotech/lxc,jirislaby/lxc,armcc/lxc,federicobriata/lxc,bostjan/lxc,virajs/lxc,rowhit/lxc,lisongmin/lxc,akshaykarle/lxc,aeris/lxc,GreatFruitOmsk/lxc,christiaan/lxc,efiop/lxc,fwilson42/lxc,terceiro/lxc,ysbnim/lxc,tych0/lxc,efiop/lxc,Ponce/lxc,thmo/lxc,cjwatson/lxc,jirislaby/lxc,JohnPeacockMessageSystems/lxc,efiop/lxc,szaszg/lxc,rowhit/lxc,DarknessBeforeDawn/lxc,caglar10ur/lxc,hkjolhede/lxc,christiaan/lxc,thmo/lxc,JohnPeacockMessageSystems/lxc,federicobriata/lxc,major/lxc,ioops/lxc,raspberrypython/lxc,christiaan/lxc,QingweiPeterLan/cs188-lxc,fwilson42/lxc