16 Apr, 2012
1 commit
-
Use of "unsigned int" is preferred to bare "unsigned" in net tree.
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
27 Feb, 2012
2 commits
-
When a Tclunk or Tremove request is flushed, the fid is not freed on the
server.p9_client_clunk() should retry once on interrupt, then if interrupted
again, leak the fid for the duration of the connection.p9_client_remove() should call p9_client_clunk() on interrupt
instead of unconditionally destroying the fid.Signed-off-by: Jim Garlick
Signed-off-by: Eric Van Hensbergen -
When a signal is received while sending a Tflush, the client,
which has recursed into p9_client_rpc() while sending another request,
should wait for Rflush as long as the transport is still up.Signed-off-by: Jim Garlick
Signed-off-by: Eric Van Hensbergen
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
23 Jul, 2011
7 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 -
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
25 May, 2011
2 commits
-
We need to return -1 on error. Also handle error properly
Signed-off-by: Aneesh Kumar K.V
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
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.
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
2 commits
-
Signed-off-by: Harsh Prateek Bora
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
1 commit
-
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
15 Mar, 2011
6 commits
-
Signed-off-by: Aneesh Kumar K.V
Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen -
If a transport prefers payload to be sent separate from the PDU
(P9_TRANS_PREF_PAYLOAD_SEP), there is no need to allocate msize
PDU buffers(struct p9_fcall).This patch allocates only upto 4k buffers for this kind of transports
and there won't be any change to the legacy transports.Hence, this patch on top of zero copy changes allows user to
specify higher msizes through the mount option
without hogging the kernel heap.Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen -
This takes care of copying out error buffers from user buffer
payloads when we are using zero copy. This happens because the
only payload buffer the server has to respond to the request is
the user buffer given for the zero copy read.Because we only use zerocopy when the amount of data to transfer
is greater than a certain size (currently 4K) and error strings are
limited to ERRMAX (currently 128) we don't need to worry about there
being sufficient space for the error to fit in the payload.Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen -
Modify p9_client_readdir() to check the transport preference and act according
If the preference is P9_TRANS_PREF_PAYLOAD_SEP, send the payload
separately instead of putting it directly on PDU.Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen -
Modify p9_client_write() to check the transport preference and act accordingly.
If the preference is P9_TRANS_PREF_PAYLOAD_SEP, send the payload
separately instead of putting it directly on PDU.Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen -
Modify p9_client_read() to check the transport preference and act accordingly.
If the preference is P9_TRANS_PREF_PAYLOAD_SEP, send the payload
separately instead of putting it directly on PDU.Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen
28 Oct, 2010
9 commits
-
This patch ensures that a read(fd, NULL, 10) returns EFAULT on a 9p file.
Signed-off-by: Sanchit Garg
Signed-off-by: Aneesh Kumar K.V
Signed-off-by: Eric Van Hensbergen -
SYNOPSIS
size[4] Tfsync tag[2] fid[4] datasync[4]size[4] Rfsync tag[2]
DESCRIPTION
The Tfsync transaction transfers ("flushes") all modified in-core data of
file identified by fid to the disk device (or other permanent storage
device) where that file resides.If datasync flag is specified data will be fleshed but does not flush
modified metadata unless that metadata is needed in order to allow a
subsequent data retrieval to be correctly handled.Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen -
We need to return error in case we fail to encode data in protocol buffer.
This patch also return error in case of a failed copy_from_user.Signed-off-by: Aneesh Kumar K.V
Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen -
If there is not enough space for the PDU on the VirtIO ring, current
code returns -EIO propagating the error to user.This patch introduced a wqit_queue on the channel, and lets the process
wait on this queue until VirtIO ring frees up.Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen -
Synopsis
size[4] TReadlink tag[2] fid[4]
size[4] RReadlink tag[2] target[s]Description
Readlink is used to return the contents of the symoblic link
referred by fid. Contents of symboic link is returned as a
response.target[s] - Contents of the symbolic link referred by fid.
Signed-off-by: M. Mohan Kumar
Reviewed-by: Aneesh Kumar K.V
Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen -
Synopsis
size[4] TGetlock tag[2] fid[4] getlock[n]
size[4] RGetlock tag[2] getlock[n]Description
TGetlock is used to test for the existence of byte range posix locks on a file
identified by given fid. The reply contains getlock structure. If the lock could
be placed it returns F_UNLCK in type field of getlock structure. Otherwise it
returns the details of the conflicting locks in the getlock structuregetlock structure:
type[1] - Type of lock: F_RDLCK, F_WRLCK
start[8] - Starting offset for lock
length[8] - Number of bytes to check for the lock
If length is 0, check for lock in all bytes starting at the location
'start' through to the end of file
pid[4] - PID of the process that wants to take lock/owns the task
in case of reply
client[4] - Client id of the system that owns the process which
has the conflicting lockSigned-off-by: M. Mohan Kumar
Signed-off-by: Aneesh Kumar K.V
Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen -
Synopsis
size[4] TLock tag[2] fid[4] flock[n]
size[4] RLock tag[2] status[1]Description
Tlock is used to acquire/release byte range posix locks on a file
identified by given fid. The reply contains status of the lock requestflock structure:
type[1] - Type of lock: F_RDLCK, F_WRLCK, F_UNLCK
flags[4] - Flags could be either of
P9_LOCK_FLAGS_BLOCK - Blocked lock request, if there is a
conflicting lock exists, wait for that lock to be released.
P9_LOCK_FLAGS_RECLAIM - Reclaim lock request, used when client is
trying to reclaim a lock after a server restrart (due to crash)
start[8] - Starting offset for lock
length[8] - Number of bytes to lock
If length is 0, lock all bytes starting at the location 'start'
through to the end of file
pid[4] - PID of the process that wants to take lock
client_id[4] - Unique client idstatus[1] - Status of the lock request, can be
P9_LOCK_SUCCESS(0), P9_LOCK_BLOCKED(1), P9_LOCK_ERROR(2) or
P9_LOCK_GRACE(3)
P9_LOCK_SUCCESS - Request was successful
P9_LOCK_BLOCKED - A conflicting lock is held by another process
P9_LOCK_ERROR - Error while processing the lock request
P9_LOCK_GRACE - Server is in grace period, it can't accept new lock
requests in this period (except locks with
P9_LOCK_FLAGS_RECLAIM flag set)Signed-off-by: M. Mohan Kumar
Signed-off-by: Aneesh Kumar K.V
Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen -
SYNOPSIS
size[4] Tfsync tag[2] fid[4]size[4] Rfsync tag[2]
DESCRIPTION
The Tfsync transaction transfers ("flushes") all modified in-core data of
file identified by fid to the disk device (or other permanent storage
device) where that file resides.Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen -
Signed-off-by: Venkateswararao Jujjuri
Signed-off-by: Eric Van Hensbergen