12 Jan, 2012
1 commit
-
Remove wrapper functions. This makes the allocation type explicit in
all callers; I used GPF_KERNEL where it seemed obvious, left it at
GFP_ATOMIC otherwise.Signed-off-by: Rusty Russell
Reviewed-by: Christoph Hellwig
06 Jan, 2012
1 commit
-
Reduce object size by deduplicating formats.
Use vsprintf extension %pV.
Rename P9_DPRINTK uses to p9_debug, align arguments.
Add function for _p9_debug and macro to add __func__.
Add missing "\n"s to p9_debug uses.
Remove embedded function names as p9_debug adds it.
Remove P9_EPRINTK macro and convert use to pr_.
Add and use pr_fmt and pr_.$ size fs/9p/built-in.o*
text data bss dec hex filename
62133 984 16000 79117 1350d fs/9p/built-in.o.new
67342 984 16928 85254 14d06 fs/9p/built-in.o.old
$ size net/9p/built-in.o*
text data bss dec hex filename
88792 4148 22024 114964 1c114 net/9p/built-in.o.new
94072 4148 23232 121452 1da6c net/9p/built-in.o.oldSigned-off-by: Joe Perches
Signed-off-by: Eric Van Hensbergen
25 Oct, 2011
5 commits
-
This helps in more control over debugging.
root@qemu-img-64:~# ls /pass/123
ls: cannot access /pass/123: No such file or directory
root@qemu-img-64:~# cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# TASK-PID CPU# TIMESTAMP FUNCTION
# | | | | |
ls-1536 [001] 70.928584: 9p_protocol_dump: clnt 18446612132784021504 P9_TWALK(tag = 1)
000: 16 00 00 00 6e 01 00 01 00 00 00 02 00 00 00 01
010: 00 03 00 31 32 33 00 00 00 ff ff ff ff 00 00 00ls-1536 [001] 70.928587:
=> trace_9p_protocol_dump
=> p9pdu_finalize
=> p9_client_rpc
=> p9_client_walk
=> v9fs_vfs_lookup
=> d_alloc_and_lookup
=> walk_component
=> path_lookupat
ls-1536 [000] 70.929696: 9p_protocol_dump: clnt 18446612132784021504 P9_RLERROR(tag = 1)
000: 0b 00 00 00 07 01 00 02 00 00 00 4e 03 00 02 00
010: 00 00 00 00 03 00 02 00 00 00 00 00 ff 43 00 00ls-1536 [000] 70.929697:
=> trace_9p_protocol_dump
=> p9_client_rpc
=> p9_client_walk
=> v9fs_vfs_lookup
=> d_alloc_and_lookup
=> walk_component
=> path_lookupat
=> do_path_lookupSigned-off-by: Aneesh Kumar K.V
Signed-off-by: Eric Van Hensbergen -
Without this msize=4294967295 will result in a crash
Signed-off-by: Dan Carpenter
Signed-off-by: Aneesh Kumar K.V
Signed-off-by: Eric Van Hensbergen -
Instead of saying all integer argument option should be listed in the beginning
move integer parsing to each option type.Signed-off-by: Aneesh Kumar K.V
Signed-off-by: Eric Van Hensbergen -
We dereferenced "req->tc" and "req->rc" before checking for NULL.
Signed-off-by: Dan Carpenter
Signed-off-by: Aneesh Kumar K.V
Signed-off-by: Eric Van Hensbergen -
* remove lot of update to different data structure
* add a seperate callback for zero copy request.
* above makes non zero copy code path simpler
* remove conditionalizing TREAD/TREADDIR/TWRITE in the zero copy path
* Fix the dotu p9_check_errors with zero copy. Add sufficient doc around
* Add support for both in and output buffers in zero copy callback
* pin and unpin pages in the same context
* use helpers instead of defining page offset and rest of page ourself
* Fix mem leak in p9_check_errors
* Remove 'E' and 'F' in p9pdu_vwritefSigned-off-by: Aneesh Kumar K.V
Signed-off-by: Eric Van Hensbergen
06 Sep, 2011
1 commit
-
With msize equal to 512K (PAGE_SIZE * VIRTQUEUE_NUM), we hit multiple
crashes. This patch fix those.Signed-off-by: Aneesh Kumar K.V
Signed-off-by: Eric Van Hensbergen
23 Jul, 2011
9 commits
-
msize represents the maximum PDU size that includes P9_IOHDRSZ.
Signed-off-by: Venkateswararao Jujjuri "
Signed-off-by: Aneesh Kumar K.V
Signed-off-by: Eric Van Hensbergen -
unlinkat - Remove a directory entry
size[4] Tunlinkat tag[2] dirfid[4] name[s] flag[4]
size[4] Runlinkat tag[2]older Tremove have the below request format
size[4] Tremove tag[2] fid[4]
The remove message is used to remove a directory entry either file or directory
The remove opreation is actually a directory opertation and should ideally have
dirfid, if not we cannot represent the fid on server with anything other than
name. We will have to derive the directory name from fid in the Tremove request.NOTE: The operation doesn't clunk the unlink fid.
Signed-off-by: Aneesh Kumar K.V
Signed-off-by: Eric Van Hensbergen -
renameat - change name of file or directory
size[4] Trenameat tag[2] olddirfid[4] oldname[s] newdirfid[4] newname[s]
size[4] Rrenameat tag[2]older Trename have the below request format
size[4] Trename tag[2] fid[4] newdirfid[4] name[s]
The rename message is used to change the name of a file, possibly moving it
to a new directory. The rename opreation is actually a directory opertation
and should ideally have olddirfid, if not we cannot represent the fid on server
with anything other than name. We will have to derive the old directory name
from fid in the Trename request.Signed-off-by: Aneesh Kumar K.V
Signed-off-by: Eric Van Hensbergen -
Signed-off-by: Prem Karat
Signed-off-by: Aneesh Kumar K.V
Signed-off-by: Eric Van Hensbergen -
free the fid even in case of failed clunk.
Signed-off-by: Aneesh Kumar K.V
Signed-off-by: Eric Van Hensbergen -
Signed-off-by: Venkateswararao Jujjuri "
Reviewed-by: Aneesh Kumar K.V
Signed-off-by: Eric Van Hensbergen -
Signed-off-by: Venkateswararao Jujjuri "
Reviewed-by: Aneesh Kumar K.V
Signed-off-by: Eric Van Hensbergen -
Switch to generic kernel hexdump library and cleanup macros to
be more consistent with the way we do normal debug prints.Signed-off-by: Eric Van Hensbergen
-
There was a BUG_ON to protect against a bad id which could be dealt with
more gracefully.Reported-by: Natalie Orlin
Signed-off-by: Eric Van Hensbergen
27 May, 2011
1 commit
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
RDMA/cma: Save PID of ID's owner
RDMA/cma: Add support for netlink statistics export
RDMA/cma: Pass QP type into rdma_create_id()
RDMA: Update exported headers list
RDMA/cma: Export enum cma_state in
RDMA/nes: Add a check for strict_strtoul()
RDMA/cxgb3: Don't post zero-byte read if endpoint is going away
RDMA/cxgb4: Use completion objects for event blocking
IB/srp: Fix integer -> pointer cast warnings
IB: Add devnode methods to cm_class and umad_class
IB/mad: Return EPROTONOSUPPORT when an RDMA device lacks the QP required
IB/uverbs: Add devnode method to set path/mode
RDMA/ucma: Add .nodename/.mode to tell userspace where to create device node
RDMA: Add netlink infrastructure
RDMA: Add error handling to ib_core_init()
26 May, 2011
1 commit
-
The RDMA CM currently infers the QP type from the port space selected
by the user. In the future (eg with RDMA_PS_IB or XRC), there may not
be a 1-1 correspondence between port space and QP type. For netlink
export of RDMA CM state, we want to export the QP type to userspace,
so it is cleaner to explicitly associate a QP type to an ID.Modify rdma_create_id() to allow the user to specify the QP type, and
use it to make our selections of datagram versus connected mode.Signed-off-by: Sean Hefty
Signed-off-by: Roland Dreier
25 May, 2011
5 commits
-
Teach 9p filesystem to work in container with non-default network namespace.
(Note: I also patched the unix domain socket code but don't have a test case
for that. It's the same fix, I just don't have a server for it...)To test, run diod server (http://code.google.com/p/diod):
diod -n -f -L stderr -l 172.23.255.1:9999 -c /dev/null -e /root
and then mount like so:
mount -t 9p -o port=9999,aname=/root,version=9p2000.L 172.23.255.1 /mntA container test environment is described at http://landley.net/lxc
Signed-off-by: Rob Landley
Signed-off-by: Eric Van Hensbergen -
We need to return -1 on error. Also handle error properly
Signed-off-by: Aneesh Kumar K.V
Signed-off-by: Eric Van Hensbergen -
The 9p client is currently undergoing regular regresssion and
stress testing as a by-product of the virtfs work. I think its
finally time to take off the experimental tags from the well-tested
code paths.Signed-off-by: Eric Van Hensbergen
-
Typo fixes and minor cleanups for v9fs
Signed-off-by: Rob Landley
Reviewed-by: Venkateswararao Jujjuri (JV)
Signed-off-by: Eric Van Hensbergen -
As on Jeopardy, my question is in the form of a patch: Does this have
some special meaning, or is it an accident? (I looked at other
filesystems but they didn't bother having doc entries for their
init/exit function that I could find.)Signed-off-by: Rob Landley
Signed-off-by: Eric Van Hensbergen
21 May, 2011
1 commit
-
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1446 commits)
macvlan: fix panic if lowerdev in a bond
tg3: Add braces around 5906 workaround.
tg3: Fix NETIF_F_LOOPBACK error
macvlan: remove one synchronize_rcu() call
networking: NET_CLS_ROUTE4 depends on INET
irda: Fix error propagation in ircomm_lmp_connect_response()
irda: Kill set but unused variable 'bytes' in irlan_check_command_param()
irda: Kill set but unused variable 'clen' in ircomm_connect_indication()
rxrpc: Fix set but unused variable 'usage' in rxrpc_get_transport()
be2net: Kill set but unused variable 'req' in lancer_fw_download()
irda: Kill set but unused vars 'saddr' and 'daddr' in irlan_provider_connect_indication()
atl1c: atl1c_resume() is only used when CONFIG_PM_SLEEP is defined.
rxrpc: Fix set but unused variable 'usage' in rxrpc_get_peer().
rxrpc: Kill set but unused variable 'local' in rxrpc_UDP_error_handler()
rxrpc: Kill set but unused variable 'sp' in rxrpc_process_connection()
rxrpc: Kill set but unused variable 'sp' in rxrpc_rotate_tx_window()
pkt_sched: Kill set but unused variable 'protocol' in tc_classify()
isdn: capi: Use pr_debug() instead of ifdefs.
tg3: Update version to 3.119
tg3: Apply rx_discards fix to 5719/5720
...Fix up trivial conflicts in arch/x86/Kconfig and net/mac80211/agg-tx.c
as per Davem.
20 May, 2011
2 commits
-
Probably just cut and pasted from the other parse_opts() implementations
in the 9p sources.Signed-off-by: David S. Miller
-
Signed-off-by: David S. Miller
13 May, 2011
1 commit
-
When p9pdu_readf() is called with "s" attribute, it allocates a pointer that
will store a string. In p9dirent_read(), this pointer is not being released,
leading to out of memory errors.
This patch releases this pointer after string is copyed to dirent->d_name.Signed-off-by: Pedro Scarapicchia Junior
Signed-off-by: Eric Van Hensbergen
10 May, 2011
1 commit
-
Use proper data type to handle get_user_pages_fast error condition. Also
do not treat EFAULT error as fatal.Signed-off-by: M. Mohan Kumar
Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen
16 Apr, 2011
3 commits
-
Signed-off-by: Harsh Prateek Bora
Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric VAn Hensbergen -
Signed-off-by: Aneesh Kumar K.V
Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen -
Now that we use write_inode to flush server
cache related to fid, we don't need tsyncfs either fort dotl or dotu
protocols. For dotu this helps to do a more efficient server flush.Signed-off-by: Aneesh Kumar K.V
Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen
13 Apr, 2011
1 commit
-
Fixes the following warnings:
net/9p/client.c:1305:18: warning: variable ‘total’ set but not used [-Wunused-but-set-variable]
net/9p/client.c:1370:18: warning: variable ‘total’ set but not used [-Wunused-but-set-variable]
net/9p/client.c:1769:18: warning: variable ‘total’ set but not used [-Wunused-but-set-variable]Signed-off-by: David S. Miller
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
23 Mar, 2011
6 commits
-
Recent zerocopy work in the 9P VirtIO transport maps and pins
user buffers into kernel memory for the server to work on them.
Since the user process can initiate this kind of pinning with a simple
read/write call, thousands of IO threads initiated by the user process can
hog the system resources and could result into denial of service.This patch introduces flow control to avoid that extreme scenario.
The ceiling limit to avoid denial of service attacks is set to relatively
high (nr_free_pagecache_pages()/4) so that it won't interfere with
regular usage, but can step in extreme cases to limit the total system
hang. Since we don't have a global structure to accommodate this variable,
I choose the virtio_chan as the home for this.Signed-off-by: Venkateswararao Jujjuri
Reviewed-by: Badari Pulavarty
Signed-off-by: Eric Van Hensbergen -
Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen -
Given that the sprious wake-ups are common, we need to move the
condition setting right next to the wake_up(). After setting the condition
to req->status = REQ_STATUS_RCVD, sprious wakeups may cause the
virtqueue back on the free list for someone else to use.
This may result in kernel panic while relasing the pinned pages
in p9_release_req_pages().Also rearranged the while loop in req_done() for better redability.
Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen -
Process may wait to get space on VirtIO ring to send a transaction to
VirtFS server. Current code just does a conditional wake_up() which
means only one process will be woken up even if multiple processes
are waiting.This fix makes the wake_up unconditional. Hence we won't have any
processes waiting for-ever.Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen -
Signed-off-by: Aneesh Kumar K.V
Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen -
Without this we can cause reclaim allocation in writepage.
[ 3433.448430] =================================
[ 3433.449117] [ INFO: inconsistent lock state ]
[ 3433.449117] 2.6.38-rc5+ #84
[ 3433.449117] ---------------------------------
[ 3433.449117] inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-R} usage.
[ 3433.449117] kswapd0/505 [HC0[0]:SC0[0]:HE1:SE1] takes:
[ 3433.449117] (iprune_sem){+++++-}, at: [] shrink_icache_memory+0x45/0x2b1
[ 3433.449117] {RECLAIM_FS-ON-W} state was registered at:
[ 3433.449117] [] mark_held_locks+0x52/0x70
[ 3433.449117] [] lockdep_trace_alloc+0x85/0x9f
[ 3433.449117] [] slab_pre_alloc_hook+0x18/0x3c
[ 3433.449117] [] kmem_cache_alloc+0x23/0xa2
[ 3433.449117] [] idr_pre_get+0x2d/0x6f
[ 3433.449117] [] p9_idpool_get+0x30/0xae
[ 3433.449117] [] p9_client_rpc+0xd7/0x9b0
[ 3433.449117] [] p9_client_clunk+0x88/0xdb
[ 3433.449117] [] v9fs_evict_inode+0x3c/0x48
[ 3433.449117] [] evict+0x1f/0x87
[ 3433.449117] [] dispose_list+0x47/0xe3
[ 3433.449117] [] evict_inodes+0x138/0x14f
[ 3433.449117] [] generic_shutdown_super+0x57/0xe8
[ 3433.449117] [] kill_anon_super+0x11/0x50
[ 3433.449117] [] v9fs_kill_super+0x49/0xab
[ 3433.449117] [] deactivate_locked_super+0x21/0x46
[ 3433.449117] [] deactivate_super+0x40/0x44
[ 3433.449117] [] mntput_no_expire+0x100/0x109
[ 3433.449117] [] sys_umount+0x2f1/0x31c
[ 3433.449117] [] system_call_fastpath+0x16/0x1b
[ 3433.449117] irq event stamp: 192941
[ 3433.449117] hardirqs last enabled at (192941): [] _raw_spin_unlock_irq+0x2b/0x30
[ 3433.449117] hardirqs last disabled at (192940): [] shrink_inactive_list+0x290/0x2f5
[ 3433.449117] softirqs last enabled at (188470): [] __do_softirq+0x133/0x152
[ 3433.449117] softirqs last disabled at (188455): [] call_softirq+0x1c/0x28
[ 3433.449117]
[ 3433.449117] other info that might help us debug this:
[ 3433.449117] 1 lock held by kswapd0/505:
[ 3433.449117] #0: (shrinker_rwsem){++++..}, at: [] shrink_slab+0x38/0x15f
[ 3433.449117]
[ 3433.449117] stack backtrace:
[ 3433.449117] Pid: 505, comm: kswapd0 Not tainted 2.6.38-rc5+ #84
[ 3433.449117] Call Trace:
[ 3433.449117] [] ? valid_state+0x17e/0x191
[ 3433.449117] [] ? save_stack_trace+0x28/0x45
[ 3433.449117] [] ? check_usage_forwards+0x0/0x87
[ 3433.449117] [] ? mark_lock+0x113/0x22c
[ 3433.449117] [] ? __lock_acquire+0x37a/0xcf7
[ 3433.449117] [] ? mark_lock+0x2d/0x22c
[ 3433.449117] [] ? __lock_acquire+0x392/0xcf7
[ 3433.449117] [] ? determine_dirtyable_memory+0x15/0x28
[ 3433.449117] [] ? lock_acquire+0x57/0x6d
[ 3433.449117] [] ? shrink_icache_memory+0x45/0x2b1
[ 3433.449117] [] ? down_read+0x47/0x5c
[ 3433.449117] [] ? shrink_icache_memory+0x45/0x2b1
[ 3433.449117] [] ? shrink_icache_memory+0x45/0x2b1
[ 3433.449117] [] ? shrink_slab+0xdb/0x15f
[ 3433.449117] [] ? kswapd+0x574/0x96a
[ 3433.449117] [] ? kswapd+0x0/0x96a
[ 3433.449117] [] ? kthread+0x7d/0x85
[ 3433.449117] [] ? kernel_thread_helper+0x4/0x10
[ 3433.449117] [] ? restore_args+0x0/0x30
[ 3433.449117] [] ? kthread+0x0/0x85
[ 3433.449117] [] ? kernel_thread_helper+0x0/0x10Signed-off-by: Aneesh Kumar K.V
Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen