I am using an external USB SSD (Samsung T5 Portable SSD) connected to USB 3.0 port on my laptop with kernel 4.14.3. Bus 002 Device 002: ID 04e8:61f5 Samsung Electronics Co., Ltd Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 005: ID 0bda:0177 Realtek Semiconductor Corp. Bus 001 Device 004: ID 04f2:b52d Chicony Electronics Co., Ltd Bus 001 Device 003: ID 8087:0a2a Intel Corp. Bus 001 Device 002: ID 03f0:a407 Hewlett-Packard Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub When I compile source code on the portable USB SSD, I ofter get error messages like this: 5682.333303] EXT4-fs (sdb1): Delayed block allocation failed for inode 5774711 at logical offset 247 with max blocks 4 with error 121 [ 5682.333307] EXT4-fs (sdb1): This should not happen!! Data will be lost This appears to be an I/O issue only with kernel 4.14.x. If I revert the kernel back to 4.9.66, there are no more errors and corrupted files on the portable SSD drive when compiling.
This error is fixed in the latest 4.18 kernel. Using the latest 4.18 kernel, I can now successfully compile Android on my Samsung portable SSD T5 drive w/o having "block allocation failed" error messages.