CVS log for pvfs2/src/io/dev/pint-dev.h |
|
Help |
Request diff between arbitrary revisions / Display revisions graphically
merging Orange Branch changes in
initial merge with Orange-Branch. much will be broken
Added functionality to the kernel module and client-core allowing the gossip debug masks for either the client or the kernel to be modified AFTER the client-core is started. Modified Files: include/pvfs2-debug.h src/apps/kernel/linux/pvfs2-client-core.c src/common/misc/pvfs2-debug.c src/io/dev/pint-dev.c src/io/dev/pint-dev.h src/kernel/linux-2.6/dcache.c src/kernel/linux-2.6/devpvfs2-req.c src/kernel/linux-2.6/pvfs2-dev-proto.h src/kernel/linux-2.6/pvfs2-mod.c src/kernel/linux-2.6/pvfs2-proc.c src/kernel/linux-2.6/pvfs2-utils.c src/kernel/linux-2.6/upcall.h
These changes give us the ability to modify the gossip-debug-mask for the client-core or the kernel module dynamically via the proc system. The following files were modified: include/pvfs2-debug.h src/apps/kernel/linux/pvfs2-client-core.c src/common/misc/pvfs2-debug.c src/io/dev/pint-dev.c src/io/dev/pint-dev.h src/kernel/linux-2.6/dcache.c src/kernel/linux-2.6/devpvfs2-req.c src/kernel/linux-2.6/pvfs2-dev-proto.h src/kernel/linux-2.6/pvfs2-mod.c src/kernel/linux-2.6/pvfs2-proc.c src/kernel/linux-2.6/pvfs2-utils.c src/kernel/linux-2.6/upcall.h
Reverse merged and ported to HEAD.
Merge HEAD changes to TAS-branch.
walt3 reverse merge from head includes merges of pw's sm changes (no state declarations), cleanup of state machine code, and other general merging/fixes.
Update migration branch to current CVS version
Synchronization with HEAD
merge of murali's kernel buffer size tuning options to HEAD.
murali's patch to allow tuning kernel buffer settings from client-core.
backmerging of HEAD to branch...
Merge HEAD into Walt's branch. Rework new state machines to the new cleanups introduced by Walt.
Merge posix-extensions-branch to HEAD This branch implemented patches to the 2.6.16 kernel for the proposed POSIX I/O extensions and those patches are under the patches subdirectory. It also implements the PVFS2 specific hooks for these system calls. Tools that may be of immediate use to the pvfs2 general audience is the pvfs2-lsplus utility in src/apps/admin that should be noticeably faster than the pvfs2-ls utility if there are a lot of objects in a single directory. Other features are left out by configure and are not even built if the kernels do not support those features and callbacks.
*** empty log message ***
Includes reverse merges from trunk in addition, it includes fixes for readdir and readdirplus to have a variable length number of directory entries passed in from client-core using a trailer page (currently). However, there is nothing that prevents us from sharing those pages with the kernel using vmap and friends which is the next logical step. So client-core now does a readdir/readdirplus and writev's the trailer page (which is essentially an encoded version of the readdir/readdirplus response) to the kmod. The kernel module decodes that and copies it to the user-space app (which issued the getdents/getdents_plus system call) Added/edited the getdents.c test program in the test/posix sub directory to issue getdents/getdents64/getdents_plus/getdents64_plus system calls Also fixed a critical bug that was somehow never triggered in readdir if the buffer size provided by glibc/user was not sufficient enough and we advance the f_pos token beyond where we stopped.
- applied Nathan's expandtab patch (expandtab-2.patch.gz) first referenced at: http://www.beowulf-underground.org/pipermail/pvfs2-developers/2004-July/000745.html
- fix the op tags used from the vfs by going 64bit all the way, instead of relying on unreliable casts and assumptions (murali had a working prototype -- this is a similar idea but not based on it) - use the Ld macros in the pvfs2-client-core where appropriate - some cleanups
- merging in the pvfs2-nm-nb-branch with the main tree see ChangeLog for details, or browse the cvs history of the branch for full details
NOTE THAT THIS IS A BRANCH COMMIT (tagged as nm-nb-branch). Feel free to ignore it completey as it's a snapshot of a work in progress and it will crash your computer and reformat your hard drive. This is almost the initial draft of the pvfs2-client-core that operates in a non-blocking manner. While it runs, there are still issues that need to be resolved (that are keeping it out of the main CVS trunk). Many other changes were made along the way, so it's more than just that. - added compile time option for disabling thread-safety in the client library (enabled by default; --disable-thread-safety to disable) - improved configure summary information emitted at configure time - added missing non-blocking sysint declarations to sysint header - re-wrote pvfs2-client-core to use sysint non-blocking operations where possible - made sysint test and testsome() calls more useable from a user point of view - merged dev unexp polling/handling with system interface - added PINT_sys_dev_unexp call that allows posting unexpected device messages so that they can be returned from the sysint testsome method in addition to completed sysint operations - many memory leaks fixed -- many more to go (started adding macros for freeing the server response objects) - added a id_gen_fast_unregister macro that is a no op, to make the api more consistent with the id_gen_safe_* calls - server-config-mgr: report mutex still in use if it is, but also make sure not to unlock an already unlocked mutex (valgrind complains) - many assertions added - many formatting changes - many ptr assignments to NULL after freeing in the job interface; done while tracking down a problem - modified the pint-dev device interface to make sure it can handle the pvfs2 device in a non-blocking manner - pint-dev was using buffers larger than it needed across the device; fixed them to be the right size - added a method to free the memory region mapped into the kernel through the device - freed that mapped memory region on pvfs2-client-core shutdown (valgrind complained) - modified device driver to work properly in non-blocking mode from userspace by implementing the character device poll method - modified pint-dev test function to properly handle non-blocking responses from the device driver - modified PINT_flow_reset to not allocate a new mutex unless the old one was destroyed - modified all job uses of the id-generator to use the safe, rather than fast, methods (useful for several reasons including safe cancellation) - modified cancellation methods to be able to handle ops that have already completed - modified the job_dev_unexp method to have (and honor) the no immediate completion flag if passed (used in the pvfs2-client-core) - modified the job completion callbacks to make sure to NOT add a completed job desc to the completion queue if it's already been added (by checking a flag, not scanning). this is a safety and should only be used when a non-thread-safe client library is being used in a thread safe env, but we should handle it gracefully anyway - replaced all kernel allocations of ops through the slab allocator handled op_cache to be replaced by a wrapper method (op_alloc(), as suggested by Murali) -- the other cache allocations will probably be replaced later. this allows the removal of the extern op_cache declaration - added macros for freeing some of the most heavily used server response messages (readdir, lookup, getattr) -- the others are coming later - freed dirents coming out of sysint response object in the pvfs2-client
this fixes 3 separate things reported by robl and phil. this changelog lists
phil's description and a description of the fix:
---
1) This one isn't too bad, but if I run this:
./pvfs2-client -p pvfs2-client-core
instead of this:
./pvfs2-client -p ./pvfs2-client-core
... the output looks the same either way (ie, it appears successful).
In the former case, both the client and client-core actually exited,
because i specified the path to the core incorrectly. It would be nice
if it printed something in this case to avoid confusion.
---
Ok, done...this is tricky because if the client-core is in the same dir as
the client program, a 'stat' will pass, but the execvp may fail if that dir
isn't in the system PATH. Now, we print an error if the path is not absolute
and the client core exits.
---
2) I don't know if this happens everywhere or not, but I am running on a
box here where bad things happen if I get the hostname wrong on the
mount command, for example doing something like this:
mount -t pvfs2 tcp://a43:0/pvfs2-fs /mnt/pvfs2
(note that the port is wrong). Sorry I didn't catch this when you asked
me to try this stuff out the other day :( At any rate, the mount command
segfaults, and I get this in dmesg:
Attempting PVFS2 Mount via host tcp://a43:0/pvfs2-fs
Got an unknown pvfs2 error code: -1073741967
pvfs2_fs_mount: got return value of -1073741967
Unable to handle kernel paging request at virtual address 733d4853
printing eip:
c016b062
*pde = 00000000
---
This is due to an error code translation problem. Previously, the kernel
code didn't translate all pvfs_errno codes to actual errno codes, so I've
re-worked the error code translation functions so that they can be shared
by the kernel and the user space code.
---
3) This one is kinda nasty, and I'm not sure what's going wrong yet.
The scenario is that I have successfully mounted, but then on the next
operation (a getattr), the communication fails causing the msgpair.sm to
call exit(1). The pvfs2-client and client-core then exit. I start them
back up, and nothing ever works again. I get "Input/output error" any
time I try to access pvfs2 from then on, and I get "can't write
superblock" when I try to unmount. I have to reboot the box to get back
to sanity.
---
This turned out to be a beast of a problem now that we have dynamic mounts on
the client side. The issue is that on cancelled i/o, or on pvfs2-client-core
restart, there's *no* way the kernel can associate upcalls with the client-core
anymore because the dynamic mount information is lost forever as far as the
client-core is concerned.
The solution I chose for this is to have the pvfs2-client-core issue an ioctl
that causes the kernel to do mount upcalls for every pvfs2 file system it knows
about to avoid having to have the user manually issue another mount command
(or something goofy like that). Other solutions that I considered and didn't
like are 1) having the pvfs2-client-core store mount info in a file somewhere
and have it remount those on startup, or 2) having the pvfs2-client and
pvfs2-client-core have some ipc going on so that the pvfs2-client can store
the mount info and somehow give it back to the pvfs2-client-core on restart.
both of those are shoddy at best, and do not seem robust at all (i.e.
stale file info will error out on stale remount attempts, ipc requires that
the pvfs2-client never dies along with the pvfs2-client-core, etc).
With the current solution, we have all the information that the kernel knows
about (and so it's more reliable than a file or something), and it's the most
natural way to hand the information up from the kernel (since we have to do
this via upcalls anyway). Thus, the kernel code now keeps a list of pvfs2
superblocks and we store the info given to the sb at mount time so that it
can dynamically be remounted at any time. The pvfs2-client-core now issues
an ioctl (in a thread so that it can still service the request) on startup
to 'remount' any file systems the kernel knows about. while I'm calling this
a remount, it's basically just a mechanism for the kernel to tell the client
core enough information ot rebuild the dynamic mount tables in the system
interface.
because of this, the pvfs2-client-core program *requires* pthreads. This is
completely independent of whether or not the PVFS2 sysint needs pthreads
at all.
combo PVFS_id_gen_t -> PVFS_BMI_addr_t, formatting, PVFS error code patch. Ugly. Sorry if my formatting pisses someone off; at least I'm not using > 80 columns any more :).
a more indexified interface to the shared kernel/userspace memory region used through the device file
temporary breakage shuffling kernel related constants around; some debug statements were added I guess
user level hooks for getting kernel/user shared buffer
Renamed id_gen_t to PVFS_id_gen_t and moved it definition into pvfs2-types.h. Also took the #include for id-generator.h out of header files and into .c files where possible.
filled in some of the basic work cycle code for the device interface
filled in the write functions and tested
Got rid of PINT_dev_write() function and replaced with a macro that just calls PINT_dev_write_list(), trivially implemented memalloc and memfree functions
added code stubs for pvfs2-kernel device interface
| Email pvfs2 viewcvs admin |
Powered by ViewCVS 0.9.4 |