| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=722354
|
|
|
|
|
|
|
| |
This was reading the size in the wrong place *sizep, not *(sizep-1),
plus the out of bounds checks were wrong.
https://bugzilla.gnome.org/show_bug.cgi?id=637095
|
|
|
|
|
|
|
|
|
|
|
| |
Because multiple clients can be concurrently writing to the journal,
it's possible to see partially written journal entries. Emitting
g_warning() here breaks test cases.
The real fix would be safe concurrent access to the journal, but
that's harder.
https://bugzilla.gnome.org/700785
|
|
|
|
|
|
|
|
| |
This patch ensures that we safely write all data from journals to
metatrees on exit. E.g. if anything happens to session bus or we get
replaced by some other instance.
https://bugzilla.gnome.org/show_bug.cgi?id=637095
|
|
|
|
|
|
|
| |
Since we've moved journal to a non-volatile storage, let's flush
more often to minimize a chance of data loss.
https://bugzilla.gnome.org/show_bug.cgi?id=637095
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This essentially moves is_on_nfs() from metatree.c in metabuilder.c
as the more appropriate place for shared functions. It's used in
meta_builder_get_journal_filename() to determine whether to use original
metadata directory or temporary $XDG_RUNTIME_DIR location to work around
certain NFS issues.
The idea behind this change is to have separate journals for every client
that is accessing shared homedir. Then the only possible point of conflict
is on rotation which is backed up by atomic file rename. Without this,
there were multiple metadata daemons writing to the same journal file,
overwriting changes to each other and being racy in flush and rotation.
There will always be a conflict between clients, overwriting tree file
data by flushing their journals.
https://bugzilla.gnome.org/show_bug.cgi?id=637095
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With concurrent access of multiple daemons there may be a moment when
tree file exists but not the journal file. The daemon can't write
anything without journal and is doomed until next rotation. Missing
journal file can also happen on system crash etc.
This patch tries to create new journal file only when it doesn't exist,
other errors still lead to inability to store anything.
This will also allow us to have journal file somewhere else, e.g. on
a non-persistent storage.
https://bugzilla.gnome.org/show_bug.cgi?id=637095
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In shared NFS homedir case with multiple clients writing to the same
mmaped journal file data can get easily corrupted. The daemon iterates
over a journal file on flush taking in account variable entry size and
advances according to the data read.
However in certain case invalid data are read making us to jump out of
bounds. In case of zero entry size we would stand at the same place
leading to infinite loop.
This patch checks if the indicated entry size is at least the size of
the structure we're getting the size from (it's a first element) and breaks
the iteration cycle if it's not. This may lead to partial data loss on flush
as we don't process the rest of the journal file. Old data from existing
tree file will be preserved of course, only few recent changes would get lost.
https://bugzilla.gnome.org/show_bug.cgi?id=637095
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Once we flush the journal and write new tree file we need to re-read
it to refresh internal data structures (and mmap data from the right
file). We originally left this work on meta_tree_refresh_locked() and
meta_tree_needs_rereading() respectively where we checked the rotated
bit.
In detail, metabuilder wrote a new temp tree file, then explicitly opened
the current (old) one, wrote the rotated bit and atomically replaced the
temp file. Then the metadata daemon having mmapped the old file detected
the rotated bit and scheduled journal and tree file reopen+reread.
However in concurrent environment like NFS homedir where multiple metadata
daemons are handling the same database we may run in a race and not getting
the rotated bit detected properly.
This led to an infinite loop between meta_journal_add_entry() -
meta_tree_flush_locked() - meta_tree_refresh_locked() - meta_journal_add_entry()
since we had full journal, didn't detect the rotation and since the files
were already unlinked, there was no force to break that loop. This patch
forces tree file re-read after successful flush to prevent this issue.
https://bugzilla.gnome.org/show_bug.cgi?id=637095
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=695834
|
| |
|
|
|
|
|
|
| |
See http://git.gnome.org/browse/glib/commit/?id=2002479c02fa6e468fc3f67ddc663657a52ebde8
https://bugzilla.gnome.org/show_bug.cgi?id=687236
|
|
|
|
|
|
|
| |
Under OpenBSD, the statfs structure does not support "f_type". So, use
"f_fstypename" to check for NFS.
https://bugzilla.gnome.org/show_bug.cgi?id=685126
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updating the address of the FSF.
This has been done by:
while read file; do
sed -i 's:59 Temple Place:51 Franklin Street:' $file
sed -i 's:Suite 330:Fifth Floor:' $file
sed -i 's:02111-1307:02110-1301:' $file
done
https://bugzilla.gnome.org/show_bug.cgi?id=656598
Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
|
|
|
|
|
| |
Use G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS and G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES
flags where applicable.
|
| |
|
|
|
|
|
|
|
|
| |
This is a complete port of volume monitors and metadata to GDBus.
The (private) d-bus API has been mostly preserved except of
MountOp methods.
No difference in functionality should be observed.
|
|
|
|
|
|
|
| |
GStaticMutex and GStaticRWLock have been replaced by GMutex
and GRWLock, and g_thread_init() is no longer needed.
https://bugzilla.gnome.org/show_bug.cgi?id=661148
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=659815
|
|
|
|
|
| |
Especially now that deprecations are proper gcc warnings, no need
to hardcode this.
|
|
|
|
| |
Found by Coverity Scan analysis
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=641856
|
|
|
|
| |
This makes gvfs build with recent glib again, see bug #619537
|
|
|
|
| |
Patch by "paul <ephraim_owns@hotmail.com>" Fixes bug #60468.
|
|
|
|
| |
Also, make sure to free that in all callers.
|
| |
|
|
|
|
|
|
| |
Before we used to store -1 (0xffffffff) as the mtime base in this case.
This value is not used if there are no mtimes though, so this is more
like a cosmetic change.
|
|
|
|
|
|
| |
The conversion to unsigned means we failed to recognize errors,
since if (ret < 0) was never hit. This is the suspected cause
for data loss in bug 598561.
|
|
|
|
|
| |
This is needed so we never end up having a stable file with the
rotated bit set. Should fix bug #600057.
|
|
|
|
| |
This will protect against bugs where the stable file has the rotated bug set (which should never happen but see bug #600057)
|
|
|
|
| |
Closes bug #597104
|
| |
|
|
|
|
| |
Need to free /proc/fd/mountinfo contents after reading it.
|
|
|
|
| |
Found these with valgrind
|
| |
|
|
|
|
|
| |
Testing a simple loop of writes long enough to cause a log wrap
showed a bunch of leaks in valgrind. This fixes them all.
|
| |
|
|
|
|
|
| |
We succeeded and then said we didn't, causing the set operation
that caused the rotation to fail.
|
|
|
|
| |
These were reported in bug 590456.
|
|
|
|
|
| |
On FreeBSD, the crc32 symbol conflicts with a function of the same
name in libz, causing segfaults. Fixes bug 589786.
|
|
|
|
|
|
| |
Initialize the DBus error structure before calling
dbus_bus_request_name().
Fix bug #589015, patch by Patryk Zawadzki.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In particular this snippet
giomodulesdir=`pkg-config --variable=giomoduledir gio-2.0`
is wrong as it breaks 'make distcheck' unless you can write to where
the gio modules are installed. While this is true for jhbuild setups
it is patently not true for normal setups.
In fact, one could argue that glib's --with-gio-module-dir option is
incompatible with how we build things, but that is more of a GLib
problem.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Passing a key value type of Byte means unset that key.
|
|
|
|
|
|
| |
meta_tree_refresh calls meta_tree_init which may call
meta_tree_refresh, which can deadlock due to the writer lock. Call
meta_tree_refresh_locked instead.
|