- Apr 09, 2013
-
-
Christoph Hellwig authored
-
- Apr 07, 2013
-
-
Guy Zana authored
the socket implementation of fo_close() frees the socket structure and that in turn invokes poll_wake() which uses refcounting as it mess with the file structure. the following patch increases the refcount by 1 before calling fo_close() so we avoid entering the free area in fdrop twice.
-
Guy Zana authored
-
- Apr 03, 2013
-
-
Nadav Har'El authored
The previous code created certain empty directories in the boot file system (/tmp, /java, /usr/lib) and the bootfs.manifest could only put files in those directories - attempting to include a file "/foo/bar" would fail unpacking. Now, we just create one empty directory (/tmp, I don't even know if it's necessary), and got rid of the hard-code list of directories - directories are automatically created as needed. I.e., if the bootfs.manifest contains a file path /foo/bar/dog, we mkdir() /foo, then mkdir() /foo/bar, and only then creat() /foo/bar/dog.
-
- Apr 02, 2013
-
-
Guy Zana authored
-
- Mar 28, 2013
-
-
Guy Zana authored
fdrop() may call fo_close() and a private fo_close() may use the FD layer. For example, NFS client may open a socket to flush the file. Another reason is that it's unnecessary and the shorter we hold the mutex, the better.
-
Guy Zana authored
fdset(fd, fp) now installs fp on fd and closes a previousely opened file if there was any, this makes dup2() and dup3() behave as expected.
-
Guy Zana authored
solving a race in fget() where retrieving the file structure and increasing its refcount is not done atomically - a concurrent close() may free the file structure and fhold() may fault. fdfree() was replaced with fdclose() which removes the file from the gfdt and then calls fdrop() - that removes the ugly double fdrop() calls. Credit goes to Avi for that.
-
Guy Zana authored
-
Guy Zana authored
It's more intuitive and aligned with other OS. As appointed out by Christoph.
-
- Mar 27, 2013
-
-
Guy Zana authored
In case there's an error installing the file descriptor (fdalloc() fails), fdrop() should be called since it also functions as a desctructor (encapsulation).
-
Guy Zana authored
as part of the changes to the fd allocator, fdalloc() was changed to hold a refcount on fp. when falloc() returns the refcount is suppose to be 1, not 2
-
Guy Zana authored
The old code didn't really close newfd properly, put an assert and a comment instead for now.
-
Guy Zana authored
this check should be ditched completely...
-
Guy Zana authored
-
Guy Zana authored
-
Guy Zana authored
dup3() may corrupt memory if new_fd is bigger than FDMAX
-
Guy Zana authored
ramfs and fatfs rely on it to function properly.
-
Guy Zana authored
falloc() installs the file structure to the global fd table. in case there's an error with sys_open (common for user applications), fdfree() was never called
-
- Mar 25, 2013
-
-
Christoph Hellwig authored
We now grab an additional long-term reference on open/dup thay stays for the lifetime of the file descriptor. The semantics of the global falloc/falloc_noinstall/etc functions matches those of FreeBSD now. As pointed out by Guy.
-
Guy Zana authored
-
Guy Zana authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
This is not needed because each file still keeps a vnode reference and thus pins it, but at the same time makes the close implementation a lot simpler, especially after file operations are added.
-
- Mar 11, 2013
-
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
This allows taking BIO_ERROR into the block layer core and remove unsafe bio_flags manipulations in the virtio-blk driver.
-
- Feb 28, 2013
-
-
Avi Kivity authored
found by mode=release
-
- Feb 21, 2013
-
-
Christoph Hellwig authored
Just like fat the test isn't wired up yet until we have the infrastructure for it.
-
Christoph Hellwig authored
-
- Feb 20, 2013
-
-
Christoph Hellwig authored
Imported from prex. Note that the test isn't wired up yet as we'll need more infrastructure changes to run it.
-
- Feb 18, 2013
-
-
Christoph Hellwig authored
-
- Feb 12, 2013
-
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-
Christoph Hellwig authored
-