Add a check to prevent overwriting valid data if smgrnblocks() gives a wrong answer, as has been seen to occur with a buggy Linux kernel.  Not really our bug, but it's a simple test in a seldom-used control path, so might as well have a defense.
Add a check to prevent overwriting valid data if smgrnblocks() gives a
wrong answer, as has been seen to occur with a buggy Linux kernel.  Not
really our bug, but it's a simple test in a seldom-used control path,
so might as well have a defense.

CraigHarris/gpdb,lpetrov-pivotal/gpdb,zaksoup/gpdb,cjcjameson/gpdb,Chibin/gpdb,randomtask1155/gpdb,edespino/gpdb,randomtask1155/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,rvs/gpdb,kaknikhil/gpdb,ovr/postgres-xl,randomtask1155/gpdb,xinzweb/gpdb,arcivanov/postgres-xl,postmind-net/postgres-xl,pavanvd/postgres-xl,ashwinstar/gpdb,tangp3/gpdb,rvs/gpdb,xinzweb/gpdb,randomtask1155/gpdb,tangp3/gpdb,lisakowen/gpdb,50wu/gpdb,postmind-net/postgres-xl,zaksoup/gpdb,jmcatamney/gpdb,Chibin/gpdb,CraigHarris/gpdb,lintzc/gpdb,CraigHarris/gpdb,CraigHarris/gpdb,lpetrov-pivotal/gpdb,Postgres-XL/Postgres-XL,lintzc/gpdb,tpostgres-projects/tPostgres,randomtask1155/gpdb,kaknikhil/gpdb,rubikloud/gpdb,atris/gpdb,lpetrov-pivotal/gpdb,oberstet/postgres-xl,zaksoup/gpdb,adam8157/gpdb,chrishajas/gpdb,snaga/postgres-xl,xuegang/gpdb,yuanzhao/gpdb,kaknikhil/gpdb,yazun/postgres-xl,foyzur/gpdb,rubikloud/gpdb,chrishajas/gpdb,yazun/postgres-xl,zaksoup/gpdb,rvs/gpdb,tangp3/gpdb,lintzc/gpdb,lpetrov-pivotal/gpdb,oberstet/postgres-xl,adam8157/gpdb,cjcjameson/gpdb,yazun/postgres-xl,janebeckman/gpdb,zeroae/postgres-xl,atris/gpdb,greenplum-db/gpdb,50wu/gpdb,adam8157/gpdb,lpetrov-pivotal/gpdb,oberstet/postgres-xl,pavanvd/postgres-xl,yuanzhao/gpdb,atris/gpdb,kaknikhil/gpdb,kaknikhil/gpdb,lisakowen/gpdb,zeroae/postgres-xl,0x0FFF/gpdb,jmcatamney/gpdb,foyzur/gpdb,tangp3/gpdb,ahachete/gpdb,kaknikhil/gpdb,xinzweb/gpdb,techdragon/Postgres-XL,edespino/gpdb,kmjungersen/PostgresXL,randomtask1155/gpdb,lisakowen/gpdb,yuanzhao/gpdb,50wu/gpdb,xinzweb/gpdb,zaksoup/gpdb,tangp3/gpdb,cjcjameson/gpdb,50wu/gpdb,cjcjameson/gpdb,atris/gpdb,cjcjameson/gpdb,xuegang/gpdb,snaga/postgres-xl,Quikling/gpdb,foyzur/gpdb,randomtask1155/gpdb,tpostgres-projects/tPostgres,kaknikhil/gpdb,Quikling/gpdb,zeroae/postgres-xl,royc1/gpdb,arcivanov/postgres-xl,rubikloud/gpdb,chrishajas/gpdb,ahachete/gpdb,ashwinstar/gpdb,lintzc/gpdb,50wu/gpdb,lintzc/gpdb,lpetrov-pivotal/gpdb,royc1/gpdb,kaknikhil/gpdb,tpostgres-projects/tPostgres,janebeckman/gpdb,rvs/gpdb,cjcjameson/gpdb,lpetrov-pivotal/gpdb,greenplum-db/gpdb,lintzc/gpdb,ashwinstar/gpdb,yuanzhao/gpdb,50wu/gpdb,zaksoup/gpdb,xuegang/gpdb,rubikloud/gpdb,jmcatamney/gpdb,atris/gpdb,janebeckman/gpdb,royc1/gpdb,foyzur/gpdb,chrishajas/gpdb,CraigHarris/gpdb,adam8157/gpdb,jmcatamney/gpdb,atris/gpdb,rvs/gpdb,janebeckman/gpdb,atris/gpdb,pavanvd/postgres-xl,cjcjameson/gpdb,chrishajas/gpdb,xuegang/gpdb,adam8157/gpdb,yuanzhao/gpdb,arcivanov/postgres-xl,ovr/postgres-xl,ovr/postgres-xl,lintzc/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,rvs/gpdb,tpostgres-projects/tPostgres,tpostgres-projects/tPostgres,jmcatamney/gpdb,Quikling/gpdb,edespino/gpdb,lisakowen/gpdb,lisakowen/gpdb,royc1/gpdb,0x0FFF/gpdb,rvs/gpdb,lisakowen/gpdb,Postgres-XL/Postgres-XL,royc1/gpdb,janebeckman/gpdb,Chibin/gpdb,foyzur/gpdb,arcivanov/postgres-xl,yuanzhao/gpdb,xuegang/gpdb,oberstet/postgres-xl,rubikloud/gpdb,CraigHarris/gpdb,rubikloud/gpdb,Quikling/gpdb,xinzweb/gpdb,chrishajas/gpdb,arcivanov/postgres-xl,techdragon/Postgres-XL,Quikling/gpdb,cjcjameson/gpdb,arcivanov/postgres-xl,edespino/gpdb,xuegang/gpdb,0x0FFF/gpdb,Postgres-XL/Postgres-XL,ashwinstar/gpdb,xuegang/gpdb,kmjungersen/PostgresXL,0x0FFF/gpdb,royc1/gpdb,kaknikhil/gpdb,Chibin/gpdb,ashwinstar/gpdb,tangp3/gpdb,lintzc/gpdb,kmjungersen/PostgresXL,CraigHarris/gpdb,ahachete/gpdb,Postgres-XL/Postgres-XL,kmjungersen/PostgresXL,janebeckman/gpdb,Chibin/gpdb,foyzur/gpdb,pavanvd/postgres-xl,tangp3/gpdb,edespino/gpdb,CraigHarris/gpdb,postmind-net/postgres-xl,edespino/gpdb,cjcjameson/gpdb,Chibin/gpdb,adam8157/gpdb,edespino/gpdb,Chibin/gpdb,edespino/gpdb,Quikling/gpdb,greenplum-db/gpdb,adam8157/gpdb,zaksoup/gpdb,rvs/gpdb,jmcatamney/gpdb,lisakowen/gpdb,ahachete/gpdb,pavanvd/postgres-xl,lisakowen/gpdb,Quikling/gpdb,tangp3/gpdb,rvs/gpdb,greenplum-db/gpdb,rubikloud/gpdb,techdragon/Postgres-XL,ahachete/gpdb,yazun/postgres-xl,50wu/gpdb,lpetrov-pivotal/gpdb,edespino/gpdb,ashwinstar/gpdb,chrishajas/gpdb,greenplum-db/gpdb,yuanzhao/gpdb,janebeckman/gpdb,ovr/postgres-xl,yuanzhao/gpdb,xinzweb/gpdb,randomtask1155/gpdb,yuanzhao/gpdb,rvs/gpdb,Chibin/gpdb,Quikling/gpdb,CraigHarris/gpdb,kmjungersen/PostgresXL,zeroae/postgres-xl,cjcjameson/gpdb,ahachete/gpdb,Quikling/gpdb,xinzweb/gpdb,chrishajas/gpdb,foyzur/gpdb,ahachete/gpdb,ovr/postgres-xl,snaga/postgres-xl,xuegang/gpdb,techdragon/Postgres-XL,xuegang/gpdb,janebeckman/gpdb,Chibin/gpdb,kaknikhil/gpdb,greenplum-db/gpdb,snaga/postgres-xl,0x0FFF/gpdb,Chibin/gpdb,xinzweb/gpdb,foyzur/gpdb,0x0FFF/gpdb,Quikling/gpdb,snaga/postgres-xl,Postgres-XL/Postgres-XL,atris/gpdb,ahachete/gpdb,zeroae/postgres-xl,0x0FFF/gpdb,zaksoup/gpdb,greenplum-db/gpdb,janebeckman/gpdb,0x0FFF/gpdb,techdragon/Postgres-XL,oberstet/postgres-xl,50wu/gpdb,yazun/postgres-xl,adam8157/gpdb,royc1/gpdb,yuanzhao/gpdb,janebeckman/gpdb,postmind-net/postgres-xl,rubikloud/gpdb,postmind-net/postgres-xl,jmcatamney/gpdb,lintzc/gpdb,royc1/gpdb,edespino/gpdb