cache_length fix for do_pwrite