Commit 78019117 authored by Anton Altaparmakov's avatar Anton Altaparmakov

Merge cantab.net:/home/src/bklinux-2.6

into cantab.net:/home/src/ntfs-2.6
parents a51ab671 26123e88
...@@ -11,13 +11,13 @@ How to use the Linux packet generator module. ...@@ -11,13 +11,13 @@ How to use the Linux packet generator module.
5. After this two commands are defined: 5. After this two commands are defined:
A. "pg" to start generator and to get results. A. "pg" to start generator and to get results.
B. "pgset" to change generator parameters. F.e. B. "pgset" to change generator parameters. F.e.
pgset "clone_skb 100" sets the number of coppies of the same packet pgset "clone_skb 100" sets the number of copies of the same packet
will be sent before a new packet is allocated will be sent before a new packet is allocated
pgset "clone_skb 0" use multiple SKBs for packet generation pgset "clone_skb 0" use multiple SKBs for packet generation
pgset "pkt_size 9014" sets packet size to 9014 pgset "pkt_size 9014" sets packet size to 9014
pgset "frags 5" packet will consist of 5 fragments pgset "frags 5" packet will consist of 5 fragments
pgset "count 200000" sets number of packets to send, set to zero pgset "count 200000" sets number of packets to send, set to zero
for continious sends untill explicitly for continuous sends until explicitly
stopped. stopped.
pgset "ipg 5000" sets artificial gap inserted between packets pgset "ipg 5000" sets artificial gap inserted between packets
to 5000 nanoseconds to 5000 nanoseconds
......
...@@ -807,7 +807,7 @@ static int prof_cpu_mask_write_proc (struct file *file, const char __user *buffe ...@@ -807,7 +807,7 @@ static int prof_cpu_mask_write_proc (struct file *file, const char __user *buffe
{ {
unsigned i; unsigned i;
for (i=0; i<NR_CPUS; ++i) { for (i=0; i<NR_CPUS; ++i) {
if ( paca[i].prof_buffer && cpu_isset(1, new_value) ) if ( paca[i].prof_buffer && cpu_isset(i, new_value) )
paca[i].prof_enabled = 1; paca[i].prof_enabled = 1;
else else
paca[i].prof_enabled = 0; paca[i].prof_enabled = 0;
......
...@@ -34,8 +34,6 @@ ...@@ -34,8 +34,6 @@
static LIST_HEAD(sq_mapping_list); static LIST_HEAD(sq_mapping_list);
static spinlock_t sq_mapping_lock = SPIN_LOCK_UNLOCKED; static spinlock_t sq_mapping_lock = SPIN_LOCK_UNLOCKED;
extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, unsigned long start, unsigned long end);
/** /**
* sq_flush - Flush (prefetch) the store queue cache * sq_flush - Flush (prefetch) the store queue cache
* *
......
...@@ -396,6 +396,8 @@ static struct kiocb fastcall *__aio_get_req(struct kioctx *ctx) ...@@ -396,6 +396,8 @@ static struct kiocb fastcall *__aio_get_req(struct kioctx *ctx)
req->ki_cancel = NULL; req->ki_cancel = NULL;
req->ki_retry = NULL; req->ki_retry = NULL;
req->ki_obj.user = NULL; req->ki_obj.user = NULL;
req->ki_dtor = NULL;
req->private = NULL;
/* Check if the completion queue has enough free space to /* Check if the completion queue has enough free space to
* accept an event from this io. * accept an event from this io.
...@@ -436,9 +438,13 @@ static inline struct kiocb *aio_get_req(struct kioctx *ctx) ...@@ -436,9 +438,13 @@ static inline struct kiocb *aio_get_req(struct kioctx *ctx)
static inline void really_put_req(struct kioctx *ctx, struct kiocb *req) static inline void really_put_req(struct kioctx *ctx, struct kiocb *req)
{ {
if (req->ki_dtor)
req->ki_dtor(req);
req->ki_ctx = NULL; req->ki_ctx = NULL;
req->ki_filp = NULL; req->ki_filp = NULL;
req->ki_obj.user = NULL; req->ki_obj.user = NULL;
req->ki_dtor = NULL;
req->private = NULL;
kmem_cache_free(kiocb_cachep, req); kmem_cache_free(kiocb_cachep, req);
ctx->reqs_active--; ctx->reqs_active--;
......
...@@ -329,9 +329,6 @@ static int hugetlbfs_setattr(struct dentry *dentry, struct iattr *attr) ...@@ -329,9 +329,6 @@ static int hugetlbfs_setattr(struct dentry *dentry, struct iattr *attr)
if (error) if (error)
goto out; goto out;
error = security_inode_setattr(dentry, attr);
if (error)
goto out;
if (ia_valid & ATTR_SIZE) { if (ia_valid & ATTR_SIZE) {
error = -EINVAL; error = -EINVAL;
if (!(attr->ia_size & ~HPAGE_MASK)) if (!(attr->ia_size & ~HPAGE_MASK))
......
...@@ -32,6 +32,7 @@ static struct file *do_open(char *name, int flags) ...@@ -32,6 +32,7 @@ static struct file *do_open(char *name, int flags)
nd.dentry = dget(nd.mnt->mnt_root); nd.dentry = dget(nd.mnt->mnt_root);
nd.last_type = LAST_ROOT; nd.last_type = LAST_ROOT;
nd.flags = 0; nd.flags = 0;
nd.depth = 0;
error = path_walk(name, &nd); error = path_walk(name, &nd);
if (error) if (error)
......
...@@ -23,8 +23,6 @@ struct kioctx; ...@@ -23,8 +23,6 @@ struct kioctx;
#define KIOCB_SYNC_KEY (~0U) #define KIOCB_SYNC_KEY (~0U)
#define KIOCB_PRIVATE_SIZE (24 * sizeof(long))
/* ki_flags bits */ /* ki_flags bits */
#define KIF_LOCKED 0 #define KIF_LOCKED 0
#define KIF_KICKED 1 #define KIF_KICKED 1
...@@ -55,6 +53,7 @@ struct kiocb { ...@@ -55,6 +53,7 @@ struct kiocb {
struct kioctx *ki_ctx; /* may be NULL for sync ops */ struct kioctx *ki_ctx; /* may be NULL for sync ops */
int (*ki_cancel)(struct kiocb *, struct io_event *); int (*ki_cancel)(struct kiocb *, struct io_event *);
long (*ki_retry)(struct kiocb *); long (*ki_retry)(struct kiocb *);
void (*ki_dtor)(struct kiocb *);
struct list_head ki_list; /* the aio core uses this struct list_head ki_list; /* the aio core uses this
* for cancellation */ * for cancellation */
...@@ -65,8 +64,7 @@ struct kiocb { ...@@ -65,8 +64,7 @@ struct kiocb {
} ki_obj; } ki_obj;
__u64 ki_user_data; /* user's data for completion */ __u64 ki_user_data; /* user's data for completion */
loff_t ki_pos; loff_t ki_pos;
void *private;
char private[KIOCB_PRIVATE_SIZE];
}; };
#define is_sync_kiocb(iocb) ((iocb)->ki_key == KIOCB_SYNC_KEY) #define is_sync_kiocb(iocb) ((iocb)->ki_key == KIOCB_SYNC_KEY)
...@@ -79,6 +77,7 @@ struct kiocb { ...@@ -79,6 +77,7 @@ struct kiocb {
(x)->ki_filp = (filp); \ (x)->ki_filp = (filp); \
(x)->ki_ctx = &tsk->active_mm->default_kioctx; \ (x)->ki_ctx = &tsk->active_mm->default_kioctx; \
(x)->ki_cancel = NULL; \ (x)->ki_cancel = NULL; \
(x)->ki_dtor = NULL; \
(x)->ki_obj.tsk = tsk; \ (x)->ki_obj.tsk = tsk; \
} while (0) } while (0)
......
...@@ -36,6 +36,8 @@ extern void vunmap(void *addr); ...@@ -36,6 +36,8 @@ extern void vunmap(void *addr);
* Lowlevel-APIs (not for driver use!) * Lowlevel-APIs (not for driver use!)
*/ */
extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags); extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags);
extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags,
unsigned long start, unsigned long end);
extern struct vm_struct *remove_vm_area(void *addr); extern struct vm_struct *remove_vm_area(void *addr);
extern int map_vm_area(struct vm_struct *area, pgprot_t prot, extern int map_vm_area(struct vm_struct *area, pgprot_t prot,
struct page ***pages); struct page ***pages);
......
...@@ -617,17 +617,17 @@ struct sock_iocb { ...@@ -617,17 +617,17 @@ struct sock_iocb {
struct scm_cookie *scm; struct scm_cookie *scm;
struct msghdr *msg, async_msg; struct msghdr *msg, async_msg;
struct iovec async_iov; struct iovec async_iov;
struct kiocb *kiocb;
}; };
static inline struct sock_iocb *kiocb_to_siocb(struct kiocb *iocb) static inline struct sock_iocb *kiocb_to_siocb(struct kiocb *iocb)
{ {
BUG_ON(sizeof(struct sock_iocb) > KIOCB_PRIVATE_SIZE);
return (struct sock_iocb *)iocb->private; return (struct sock_iocb *)iocb->private;
} }
static inline struct kiocb *siocb_to_kiocb(struct sock_iocb *si) static inline struct kiocb *siocb_to_kiocb(struct sock_iocb *si)
{ {
return container_of((void *)si, struct kiocb, private); return si->kiocb;
} }
struct socket_alloc { struct socket_alloc {
......
...@@ -504,7 +504,7 @@ static void dn_nsp_linkservice(struct sock *sk, struct sk_buff *skb) ...@@ -504,7 +504,7 @@ static void dn_nsp_linkservice(struct sock *sk, struct sk_buff *skb)
struct dn_scp *scp = DN_SK(sk); struct dn_scp *scp = DN_SK(sk);
unsigned short segnum; unsigned short segnum;
unsigned char lsflags; unsigned char lsflags;
char fcval; signed char fcval;
int wake_up = 0; int wake_up = 0;
char *ptr = skb->data; char *ptr = skb->data;
unsigned char fctype = scp->services_rem & NSP_FC_MASK; unsigned char fctype = scp->services_rem & NSP_FC_MASK;
......
...@@ -548,9 +548,11 @@ static inline int __sock_sendmsg(struct kiocb *iocb, struct socket *sock, ...@@ -548,9 +548,11 @@ static inline int __sock_sendmsg(struct kiocb *iocb, struct socket *sock,
int sock_sendmsg(struct socket *sock, struct msghdr *msg, size_t size) int sock_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
{ {
struct kiocb iocb; struct kiocb iocb;
struct sock_iocb siocb;
int ret; int ret;
init_sync_kiocb(&iocb, NULL); init_sync_kiocb(&iocb, NULL);
iocb.private = &siocb;
ret = __sock_sendmsg(&iocb, sock, msg, size); ret = __sock_sendmsg(&iocb, sock, msg, size);
if (-EIOCBQUEUED == ret) if (-EIOCBQUEUED == ret)
ret = wait_on_sync_kiocb(&iocb); ret = wait_on_sync_kiocb(&iocb);
...@@ -581,15 +583,22 @@ int sock_recvmsg(struct socket *sock, struct msghdr *msg, ...@@ -581,15 +583,22 @@ int sock_recvmsg(struct socket *sock, struct msghdr *msg,
size_t size, int flags) size_t size, int flags)
{ {
struct kiocb iocb; struct kiocb iocb;
struct sock_iocb siocb;
int ret; int ret;
init_sync_kiocb(&iocb, NULL); init_sync_kiocb(&iocb, NULL);
iocb.private = &siocb;
ret = __sock_recvmsg(&iocb, sock, msg, size, flags); ret = __sock_recvmsg(&iocb, sock, msg, size, flags);
if (-EIOCBQUEUED == ret) if (-EIOCBQUEUED == ret)
ret = wait_on_sync_kiocb(&iocb); ret = wait_on_sync_kiocb(&iocb);
return ret; return ret;
} }
static void sock_aio_dtor(struct kiocb *iocb)
{
kfree(iocb->private);
}
/* /*
* Read data from a socket. ubuf is a user mode pointer. We make sure the user * Read data from a socket. ubuf is a user mode pointer. We make sure the user
* area ubuf...ubuf+size-1 is writable before asking the protocol. * area ubuf...ubuf+size-1 is writable before asking the protocol.
...@@ -598,7 +607,7 @@ int sock_recvmsg(struct socket *sock, struct msghdr *msg, ...@@ -598,7 +607,7 @@ int sock_recvmsg(struct socket *sock, struct msghdr *msg,
static ssize_t sock_aio_read(struct kiocb *iocb, char __user *ubuf, static ssize_t sock_aio_read(struct kiocb *iocb, char __user *ubuf,
size_t size, loff_t pos) size_t size, loff_t pos)
{ {
struct sock_iocb *x = kiocb_to_siocb(iocb); struct sock_iocb *x, siocb;
struct socket *sock; struct socket *sock;
int flags; int flags;
...@@ -607,6 +616,16 @@ static ssize_t sock_aio_read(struct kiocb *iocb, char __user *ubuf, ...@@ -607,6 +616,16 @@ static ssize_t sock_aio_read(struct kiocb *iocb, char __user *ubuf,
if (size==0) /* Match SYS5 behaviour */ if (size==0) /* Match SYS5 behaviour */
return 0; return 0;
if (is_sync_kiocb(iocb))
x = &siocb;
else {
x = kmalloc(sizeof(struct sock_iocb), GFP_KERNEL);
if (!x)
return -ENOMEM;
iocb->ki_dtor = sock_aio_dtor;
}
iocb->private = x;
x->kiocb = iocb;
sock = SOCKET_I(iocb->ki_filp->f_dentry->d_inode); sock = SOCKET_I(iocb->ki_filp->f_dentry->d_inode);
x->async_msg.msg_name = NULL; x->async_msg.msg_name = NULL;
...@@ -631,7 +650,7 @@ static ssize_t sock_aio_read(struct kiocb *iocb, char __user *ubuf, ...@@ -631,7 +650,7 @@ static ssize_t sock_aio_read(struct kiocb *iocb, char __user *ubuf,
static ssize_t sock_aio_write(struct kiocb *iocb, const char __user *ubuf, static ssize_t sock_aio_write(struct kiocb *iocb, const char __user *ubuf,
size_t size, loff_t pos) size_t size, loff_t pos)
{ {
struct sock_iocb *x = kiocb_to_siocb(iocb); struct sock_iocb *x, siocb;
struct socket *sock; struct socket *sock;
if (pos != 0) if (pos != 0)
...@@ -639,6 +658,16 @@ static ssize_t sock_aio_write(struct kiocb *iocb, const char __user *ubuf, ...@@ -639,6 +658,16 @@ static ssize_t sock_aio_write(struct kiocb *iocb, const char __user *ubuf,
if(size==0) /* Match SYS5 behaviour */ if(size==0) /* Match SYS5 behaviour */
return 0; return 0;
if (is_sync_kiocb(iocb))
x = &siocb;
else {
x = kmalloc(sizeof(struct sock_iocb), GFP_KERNEL);
if (!x)
return -ENOMEM;
iocb->ki_dtor = sock_aio_dtor;
}
iocb->private = x;
x->kiocb = iocb;
sock = SOCKET_I(iocb->ki_filp->f_dentry->d_inode); sock = SOCKET_I(iocb->ki_filp->f_dentry->d_inode);
x->async_msg.msg_name = NULL; x->async_msg.msg_name = NULL;
......
...@@ -433,6 +433,7 @@ rpc_lookup_parent(char *path, struct nameidata *nd) ...@@ -433,6 +433,7 @@ rpc_lookup_parent(char *path, struct nameidata *nd)
nd->dentry = dget(rpc_mount->mnt_root); nd->dentry = dget(rpc_mount->mnt_root);
nd->last_type = LAST_ROOT; nd->last_type = LAST_ROOT;
nd->flags = LOOKUP_PARENT; nd->flags = LOOKUP_PARENT;
nd->depth = 0;
if (path_walk(path, nd)) { if (path_walk(path, nd)) {
printk(KERN_WARNING "%s: %s failed to find path %s\n", printk(KERN_WARNING "%s: %s failed to find path %s\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment