Re: tweak for lockmgr

2013-05-03 Thread Pedro Martelletto
Thinking about this some more, I like it even less. VOP_ISLOCKED is actually documented by the man page to return either 0 or 1. Not some LK flag. The fact that some filesystems are lazy and just feed up lockstatus doesn't mean lockstatus is broken. It means tmpfs_islocked and ufs_islocked are

Re: tmpfs

2013-04-18 Thread Pedro Martelletto
One more note. We already have a fmt_scaled function in libutil which would be better than introducing a private dehumanisze_number. Good point; I will switch to fmt_scaled() in the next iteration of the diff. -p.

Re: tmpfs

2013-04-15 Thread Pedro Martelletto
$ cat goodfilename coincoin $ perl -pi -e 's/toto/tutu/' goodfilename works $ cp goodfilename /tmp $ perl -pi -e 's/toto/tutu/' /tmp/goodfilename Can't do inplace edit on goodfilename: File exists. $ cat /tmp/goodfilename cat: /tmp/goodfilename: No such file or directory. ktrace shows a

Re: tmpfs

2013-04-15 Thread Pedro Martelletto
http://block.io/tmpfs/tmpfs4.diff My bad, the correct URL is: http://block.io/tmp/tmpfs4.diff -p.

Re: tmpfs

2013-04-15 Thread Pedro Martelletto
However, both fs indirection structures will need fixing, as they use C99 field assignments: you know stuff like: +struct vops tmpfs_fifovops = { + .vop_lookup = tmpfs_fifo_lookup, + .vop_create = tmpfs_fifo_create, and +struct vops tmpfs_specvops = { + .vop_lookup

Re: tmpfs

2013-04-11 Thread Pedro Martelletto
Speaking of, I see a lot of int64_max sprinkled throughout, which doesn't seem right for 32 bit platforms. Hi Ted, In tmpfs3.diff there are three uses of INT64_MAX: The first, in tmpfs_mount(), concerns the maximum amount of memory (in bytes) that tmpfs will contemplate. This value is bounded

Re: tmpfs

2013-04-11 Thread Pedro Martelletto
I'd like to test this, but I'm not very experienced with building only part of the userland. How do I tell the build system to install the new header files? cd /usr/src; make obj cleandir includes Please contact me off-list should you need further assistance. -p.

Re: tmpfs

2013-04-10 Thread Pedro Martelletto
What kind of numbers are we talking about here? I have an mfs on a box where I have had to bump the inodes in order to accomodate a huge amount of small files. Around 1100k files across all tmpfs mount points. Anything beyond that limit will get you a ENOSPC error. That is obviously a bug, but

Re: tmpfs

2013-04-09 Thread Pedro Martelletto
I have ported NetBSD's tmpfs to OpenBSD. The port should be functional on i386 and amd64. I haven't tested on other architectures. There are limitations: update of mount options is not supported and the number of nodes in a tmpfs file system is limited by the number of anonymous UVM objects we

-Wshorten-64-to-32

2013-04-03 Thread Pedro Martelletto
Hi, Apple has added a -Wshorten-64-to-32 option to GCC. It generates a warning if a value is implicitly converted from a 64-bit to a 32-bit type. I found it useful, looked at the code and ported it to OpenBSD. I don't think this is worth integrating. Use at your own discretion. :) -p. Index:

tmpfs

2013-03-27 Thread Pedro Martelletto
Hi, I have ported NetBSD's tmpfs to OpenBSD. The port should be functional on i386 and amd64. I haven't tested on other architectures. There are limitations: update of mount options is not supported and the number of nodes in a tmpfs file system is limited by the number of anonymous UVM objects

Fix iteration of softdep hash tables

2013-03-25 Thread Pedro Martelletto
Hi, The code in clear_remove() and clear_inodedeps() does not iterate over the pagedep and inodedep hash tables correctly. The last entry in the table is skipped -- this is due to the fact that 'pagedep_hash' and 'inodedep_hash' hold the size of the hash tables - 1. -p. Index: