BeagleBone as a USB mass storage device?

Hi,

I am looking at plugging the BeagleBone into any device that reads USB
keys, so that the BeagleBone is seen as a UBS key, and serve files
over the network for example.

I want to know if you would see any problems using this kernel driver
that simulates a mass storage device:

http://lxr.free-electrons.com/source/drivers/usb/gadget/file_storage.c

Any idea what are the requirements on the hardware side?

Best,