MTP performance

Showing 1-1 of 1 messages
MTP performance Mike 10/8/12 2:19 AM
Hi Everyone,
I am working on improving the MTP write performance of devices in general.
I came across this code in kernel/fs/sync.c
178 int vfs_fsync_range(struct file *file, loff_t start, loff_t end, int datasync)
180         if (!file->f_op || !file->f_op->fsync)
181                 return -EINVAL;
182         return file->f_op->fsync(file, start, end, datasync);
184 EXPORT_SYMBOL(vfs_fsync_range);

can someone point out what happens if I disable this code, as I see good improvement in performance if I disable this.

Also this code has been changed in Samung's Kernel code
int vfs_fsync_range(struct file *file, loff_t start, loff_t end, int datasync) { struct address_space *mapping = file->f_mapping; int err, ret; if (!file->f_op || !file->f_op->fsync) { ret = -EINVAL; goto out; } ret = filemap_write_and_wait_range(mapping, start, end); /* * We need to protect against concurrent writers, which could cause * livelocks in fsync_buffers_list(). */ mutex_lock(&mapping->host->i_mutex); err = file->f_op->fsync(file, datasync); if (!ret) ret = err; mutex_unlock(&mapping->host->i_mutex); out: return ret; }

Can anyone point out what the additional code is doing and why. (In case you have seen this)
Also please suggest any other option to improve MTP write performance

Thanks for your help