Re: [PATCH 17/19] ceph: ioctls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 23 Jul 2009, Andi Kleen wrote:
> What I find more suspicious is that it's the direct network
> data structure. Presumably that's in a defined endian?
> So that means the application would already need to 
> change to network endian order at the ioctl level?
> 
> That seems wrong if true. I think defining
> a ioctl directly based on a network protocol header is 
> likely a bad idea.

That's a good point.  I've defined an ioctl-specific struct, so the entire 
interface is defined in the header:

---
#include <linux/ioctl.h>
#include <linux/types.h>

#define CEPH_IOCTL_MAGIC 0x97

/* just use u64 to align sanely on all archs */
struct ceph_ioctl_layout {
	__u64 stripe_unit, stripe_count, object_size;
	__u64 data_pool;
};

#define CEPH_IOC_GET_LAYOUT _IOR(CEPH_IOCTL_MAGIC, 1,		\
				   struct ceph_ioctl_layout)
#define CEPH_IOC_SET_LAYOUT _IOW(CEPH_IOCTL_MAGIC, 2,		\
				   struct ceph_ioctl_layout)
---

The remaining issues are:
- this isn't complete.  I haven't made up my mind how to list, describe, 
  and choose the data pool to store a file in; for now it's ignored.
- where the header should go.  I don't see any other file system ioctls in 
  include/linux other than ext[23]; the rest are all in fs/*.

sage
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux