ioctl.c (508b32d8661b12da4c9ca41a9b2054e1dc92fa7e) ioctl.c (0bc62284ee3f2a228c64902ed818b6ba8e04159b)
1#include <linux/ceph/ceph_debug.h>
2#include <linux/in.h>
3
4#include "super.h"
5#include "mds_client.h"
6#include "ioctl.h"
7
8

--- 27 unchanged lines hidden (view full) ---

36static long __validate_layout(struct ceph_mds_client *mdsc,
37 struct ceph_ioctl_layout *l)
38{
39 int i, err;
40
41 /* validate striping parameters */
42 if ((l->object_size & ~PAGE_MASK) ||
43 (l->stripe_unit & ~PAGE_MASK) ||
1#include <linux/ceph/ceph_debug.h>
2#include <linux/in.h>
3
4#include "super.h"
5#include "mds_client.h"
6#include "ioctl.h"
7
8

--- 27 unchanged lines hidden (view full) ---

36static long __validate_layout(struct ceph_mds_client *mdsc,
37 struct ceph_ioctl_layout *l)
38{
39 int i, err;
40
41 /* validate striping parameters */
42 if ((l->object_size & ~PAGE_MASK) ||
43 (l->stripe_unit & ~PAGE_MASK) ||
44 (l->stripe_unit != 0 &&
44 ((unsigned)l->stripe_unit != 0 &&
45 ((unsigned)l->object_size % (unsigned)l->stripe_unit)))
46 return -EINVAL;
47
48 /* make sure it's a valid data pool */
49 mutex_lock(&mdsc->mutex);
50 err = -EINVAL;
51 for (i = 0; i < mdsc->mdsmap->m_num_data_pg_pools; i++)
52 if (mdsc->mdsmap->m_data_pg_pools[i] == l->data_pool) {

--- 243 unchanged lines hidden ---
45 ((unsigned)l->object_size % (unsigned)l->stripe_unit)))
46 return -EINVAL;
47
48 /* make sure it's a valid data pool */
49 mutex_lock(&mdsc->mutex);
50 err = -EINVAL;
51 for (i = 0; i < mdsc->mdsmap->m_num_data_pg_pools; i++)
52 if (mdsc->mdsmap->m_data_pg_pools[i] == l->data_pool) {

--- 243 unchanged lines hidden ---