From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from 50-193-208-193-static.hfc.comcastbusiness.net ([50.193.208.193]:52198 "EHLO tetsuo.zabbo.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750910Ab2GERID (ORCPT ); Thu, 5 Jul 2012 13:08:03 -0400 Message-ID: <4FF5C9F2.903@zabbo.net> Date: Thu, 05 Jul 2012 10:08:02 -0700 From: Zach Brown MIME-Version: 1.0 To: Alexander Block CC: linux-btrfs@vger.kernel.org Subject: Re: [RFC PATCH 4/7] Btrfs: introduce subvol uuids and times References: <1341409108-13567-1-git-send-email-ablock84@googlemail.com> <1341409108-13567-5-git-send-email-ablock84@googlemail.com> In-Reply-To: <1341409108-13567-5-git-send-email-ablock84@googlemail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Sender: linux-btrfs-owner@vger.kernel.org List-ID: > +static long btrfs_ioctl_set_received_subvol(struct file *file, > + void __user *arg) > +{ > + struct btrfs_ioctl_received_subvol_args *sa = NULL; > + ret = copy_to_user(arg, sa, sizeof(*sa)); > +struct btrfs_ioctl_received_subvol_args { > + char uuid[BTRFS_UUID_SIZE]; /* in */ > + __u64 stransid; /* in */ > + __u64 rtransid; /* out */ > + struct timespec stime; /* in */ > + struct timespec rtime; /* out */ > + __u64 reserved[16]; > +}; Careful, timespec will be different sizes in 32bit userspace and a 64bit kernel. I'd use btrfs_timespec to get a fixed size timespec and avoid all the compat_timespec noise. (I'd then also worry about padding and might pack the struct.. I always lose track of the best practice across all archs.) - z