Re: [PATCH v2 1/5] add metadata_incore ioctl in vfs

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Arnd Bergmann
Date: Tuesday, January 4, 2011 - 2:40 am

On Tuesday 04 January 2011 06:40:32 Shaohua Li wrote:


__user only makes sense on pointers. Just make this a "struct
metadata_incore_ent __user *", which will also take care of the
"sparse" warnings you get from the copy_to_user lines below.


We usually try hard to avoid ioctls with indirect pointers
in them. The implementation is correct (most people
get this wrong), besides the extraneous __user keyword in
there.

Have you tried passing just a single metadata_incore_ent
at the ioctl and looping in user space? I would guess the
extra overhead of that would be small enough, but that might
need to be measured.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH v2 1/5] add metadata_incore ioctl in vfs, Shaohua Li, (Mon Jan 3, 10:40 pm)
Re: [PATCH v2 1/5] add metadata_incore ioctl in vfs, Arnd Bergmann, (Tue Jan 4, 2:40 am)