Skip to content
Snippets Groups Projects
  1. May 30, 2013
    • Christoph Hellwig's avatar
      zfs: rename the txg_delay ticks parameter · 5ab50444
      Christoph Hellwig authored
      It clashes with a macro of the same name in OSv.
      5ab50444
    • Christoph Hellwig's avatar
    • Christoph Hellwig's avatar
      734aa7c2
    • Christoph Hellwig's avatar
    • Christoph Hellwig's avatar
      zfs: disable per-tread counters in dmu · cebe4137
      Christoph Hellwig authored
      cebe4137
    • Christoph Hellwig's avatar
      arc: disable various bits of reclaim / paging functionality · 29cf134a
      Christoph Hellwig authored
      OSv isn't ready for this yet.
      29cf134a
    • Christoph Hellwig's avatar
      solaris: provide kmem_size · 1e63a71c
      Christoph Hellwig authored
      1e63a71c
    • Christoph Hellwig's avatar
      26d3e18c
    • Christoph Hellwig's avatar
      solaris: use native utsname · ebd9245d
      Christoph Hellwig authored
      ebd9245d
    • Nadav Har'El's avatar
      Add missing line to fs/build.mak · 75511f05
      Nadav Har'El authored
      Previous commit broke the build, because I forgot to commit a file.
      75511f05
    • Nadav Har'El's avatar
      Move unsupported fileops to fs/unsupported.c · 5062ff4f
      Nadav Har'El authored
      Previously, we re-implemented "unsupported" file operations (e.g., chmod
      for a pipe on which fchmod makes no sense) several times - there was
      an implementation only for chmod in kern_descrip.c, used in sys_socket.c,
      and af_local.cc had its own. As we add more file descriptor type (e.g.,
      create_epoll()) we'll have even more copies of these silly functions, so
      let's do it once in fs/unsupported.c - with the fs/unsupported.h header
      file.
      
      This also gives us a central place to document (and argue) whether an
      unimplemented ioctl() should return ENOTTY or EBADF (I think the former).
      5062ff4f
    • Nadav Har'El's avatar
      Fix waiting poll on unix-domain socketpair · c58c7aac
      Nadav Har'El authored
      If poll() was waiting on a file descriptor from socketpair_af_local, we
      would never wake it up, and an example of this is the failure in a
      recently committed fix to tst-af-local.cc.
      
      The problem is that when one writes to one end of the socket, we need to
      call wake_poll() on the other end of the socket, so we need to remember
      which "struct file *" is attached to each end of the af_local_buffer objects.
      
      What I did is what I thought the most elegant solution is:
      
      Rather than having "sender" and "receiver" of af_local_buffer booleans,
      they are now "struct file *". I added new functions, attach_sender(f) and
      attach_receiver(f), which set the file* we'll need to notify for each
      end; These functions are analogous to functions detach_sender, detach_receiver
      that we already had.
      
      After each interesting event - read, write, close, etc - we notify the
      appropriate file*, using poll_wake.
      
      attach_sender(f) and attach_receiver(f) is called by af_local_init(f) - which
      used to be empty and now does something. Note how af_local_init(f) only
      does send->attach_sender(f) and receive->attach_receiver(f), but doesn't
      touch the two others (send->attach_receiver, receive->attach_sender) -
      these other two are set when the second file descriptor, with the send
      and receive fifos in reversed roles, is initialized with its af_local_init.
      
      After this fix, the new af_local_test works correctly.
      c58c7aac
    • Nadav Har'El's avatar
      Demonstrate a poll() bug in unix-domain socketpair. · cc158cba
      Nadav Har'El authored
      The tst-af-local.so test supposedly tested a waiting poll() on a
      unix-domain socketpair, but unfortunately the test was incorrect - the
      writer thread usually (even always) manged to write to the socket before
      poll() started, so poll() never actually had to wait and always returned
      immediately.
      
      But it turns out, when we really do need to wait, there *is* a bug:
      poll() doesn't wake up when input arrives. So this patch fixes the *test*
      to demonstrate the bug. After this fix, the tst-af-local.so test now fails.
      I'll fix the bug, to make the test pass again, in a followup patch.
      cc158cba
  2. May 29, 2013
    • Nadav Har'El's avatar
      Don't abort on unknown sysconf. · 05c34106
      Nadav Har'El authored
      Don't abort on an unimplemented sysconf parameter. One of the documented
      functions of sysconf(3) is to "test ... whether certain options are
      supported", so programs are free to test for features we don't support
      yet, and we're supposed to return -1 with errno set to EINVAL.
      
      For example, Boost tested _SC_THREAD_SAFE_FUNCTIONS which we didn't
      support. It would have been fine if we set EINVAL (it would switch
      from *_r functions to the non-reenatrant ones) - but it wasn't fine
      that we abort()ed because of this test :-)
      
      To be on the safe side, this patch still prints a message if we see an
      unknown sysconf - in case in the future we'll come across a new one we
      must treat. But eventually, the message should go away too.
      05c34106
    • Nadav Har'El's avatar
      Implement _SC_THREAD_SAFE_FUNCTIONS sysconf · a25cb86b
      Nadav Har'El authored
      Implement the _SC_THREAD_SAFE_FUNCTIONS sysconf, returning 1.
      
      _SC_THREAD_SAFE_FUNCTIONS is defined in Posix 1003.1c ("posix threads"),
      and is supposed to return 1 if the thread-safe functions option is
      supported (*_r() functions). Since we do implement those, we should return
      1 for this sysconf.
      
      Boost's system library uses this sysconf, and if it sees it is not
      available, restorts to the _r()-less variants, for no good reason.
      a25cb86b
    • Nadav Har'El's avatar
      Implement missing readdir64() as alias to readdir() · 61e295f2
      Nadav Har'El authored
      This patch implements readdir64, as an alias to readdir. We can do this,
      because on 64-bit Linux, even the ordinary struct dirent uses 64-bit
      sizes, so the structures are identical.
      
      The reason we didn't miss this function earlier is that reasonable
      applications prefer to use readdir64_r, not readdir64. Because Boost
      filesystem library thought we don't have the former (see next patch
      for fixing this), it used the latter.
      61e295f2
    • Nadav Har'El's avatar
      Say we also implement librt.so.1. · 737f83e9
      Nadav Har'El authored
      Say we also implement librt.so.1. This is required, for example, by the
      Boost libraries (e.g., libboost_system-mt.so.1.50.0). The librt library
      isn't actually a separate library on modern Linux - rather all its
      traditional functions are now in glibc, and "librt" is merely a filter
      on glibc. So no reason not to say we support librt too.
      
      Not to mention that we already implement a bunch of functions that
      traditionally resided in librt (nanosleep, sched_yield, sem_*, etc.
      737f83e9
    • Nadav Har'El's avatar
      Add simple readdir() test · 1f6cbdd3
      Nadav Har'El authored
      Added a simple readdir() and readdir_r() test.
      The test is successful - it turns out readdir() had no bug, and the bug
      was in mkbootfs.py, but since I already wrote the test I guess might as
      well add it.
      1f6cbdd3
  3. May 28, 2013
    • Nadav Har'El's avatar
      Fix getsockname() failure · 98a1fd2b
      Nadav Har'El authored
      getsockname() used to fail because by the time the call chain reached
      kern_getsockname() it got addrlen=0. The problem is getsockname1()
      which gives it an initialized local variable instead of the given
      addrlen.
      
      Most of these layers and copies are redundant, and are only left because
      of previous incarnations of the code which had copies from user space -
      but we need to at least get the unnecessary copies right ;-)
      98a1fd2b
    • Nadav Har'El's avatar
      Overhaul java.so command line · 31681180
      Nadav Har'El authored
      Java.so used to correctly support the "-jar" option, but did not fully
      allow the other "mode" of running Java: specifying a class name which is
      supposed to be searched in the class path. The biggest problem was that
      it only know to find class files, but not a class inside a jar in the class
      path - even if the classpath was correctly set.
      
      Unfortunately, fixing this C code was impossible, as JNI's FindClass()
      simply doesn't know to look in Jars.
      
      So this patch overhauls java.so: Java.so now only runs a fixed class,
      /java/RunJava.class. This class, in turn, is the one that parses the
      command line arguments, sets the class path, finds the jar or class to
      run, etc.. The code is now much easier to understand, and actually works
      as expected :-) It also fixes the bug we had with SpecJVM2008's "compiler.*"
      benchmarks, which forced us to tweak the class path manually.
      
      The new code supports running a class from the classpath, and also the
      "-classpath" option to set the class path. Like the "java" command line
      tool in Linux, this one also recognizes wildcard classpaths. For example,
      to run Jetty, whose code is in a dozen jars in /jetty, one can do:
      
              run.py -e "java.so -classpath /jetty/* org.eclipse.jetty.xml.XmlConfiguration jetty.xml"
      31681180
    • Nadav Har'El's avatar
      bootfs: fix bug with wildcard (**) entries · 0b9ec899
      Nadav Har'El authored
      mkbootfs.py supports wildcard entries, looking like:
      /jetty/**: ../../../tmp/jetty/**
      
      The name of the generated files in the bootfs looked like this:
                      name + relpath + '/' + filename
      
      where "name" is "/jetty/", relpath is the directory under it
      (so for /jetty/foo/bar/yo, relpath is "foo/bar") and filename
      is the file name (in this example "yo"). The problem is that
      when relpath=="", i.e., files directly under /jetty, an extra
      slash was generated - e.g., /jetty//something. When this extra
      slash was written to the filesystem it confused readdir(),
      causing it to return twice for each file (once with an empty
      filename, and a second time with the real filename).
      
      This patch avoid the extra slash when relpath is empty.
      0b9ec899
    • Guy Zana's avatar
    • Guy Zana's avatar
    • Guy Zana's avatar
      loader.py: make traversing the heap generic · 9a2fb403
      Guy Zana authored
      needed for the next patch, which implements osv memory
      9a2fb403
    • Guy Zana's avatar
      788b0a8d
  4. May 27, 2013
Loading