Chinaman's grave

I was once asked "when did you walk over a chinaman's grave". It was used to imply that I was extremely unlucky. Is that what it means and where did this saying originate? Any suggestions would be appreciated.