Skip Menu |
 

Subject: Merge the profile library with meeroh optimizations
Need to do a merge of the profile library with the
meeroh-profile-sharing-optimization branch.
From: raeburn@mit.edu
Subject: CVS Commit
Download (untitled) / with headers
text/plain 1.7KiB
Checkpoint first step of merge.
Moved per-file data into a separate object from the profile handle.
Dropped some old MacOS 9 code.

* prof_int.h: Include Mac OS X versions of header files if appropriate. Only
include prof_err.h if profile.h doesn't define ERROR_TABLE_BASE_prof.
(struct _prf_data_t): Move most of contents of _prf_file_t here. Add reference
count.
(prf_data_t): New typedef.
(struct _prf_file_t): Include an array of one _prf_data_t structure.
* prof_file.c (profile_open_file): Fill in "data" field. Drop some old Mac
specific code.
(profile_flush_file_data): Renamed from profile_flush_file, now takes
prf_data_t argument.
(profile_flush_file_data): Likewise.
(profile_free_file): Now calls profile_free_file_data.
(profile_free_file_data): New function, with most of old profile_free_file
code.
* prof_init.c (profile_init_path): Removed old Mac version.
(profile_ser_size, profile_ser_externalize): Get file data from new "data"
field.
* prof_set.c (rw_setup, profile_update_relation, profile_clear_relation,
profile_rename_section, profile_add_relation): Likewise.
* prof_tree.c (profile_node_iterator): Likewise.
* test_profile.c (do_batchmode): Likewise.
* prof_int.h (profile_flush_file): Now a macro.
* prof_err.et (PROF_MAGIC_FILE_DATA): New error code value.


To generate a diff of this commit:



cvs diff -r1.118 -r1.119 krb5/src/util/profile/ChangeLog
cvs diff -r1.7 -r1.8 krb5/src/util/profile/prof_err.et
cvs diff -r1.22 -r1.23 krb5/src/util/profile/prof_file.c
cvs diff -r1.29 -r1.30 krb5/src/util/profile/prof_init.c
cvs diff -r1.23 -r1.24 krb5/src/util/profile/prof_int.h
cvs diff -r1.2 -r1.3 krb5/src/util/profile/prof_set.c
cvs diff -r1.20 -r1.21 krb5/src/util/profile/prof_tree.c
cvs diff -r1.12 -r1.13 krb5/src/util/profile/test_profile.c
From: raeburn@mit.edu
Subject: CVS Commit
Support \r as additional line separator on Mac OS X.

* prof_parse.c (profile_parse_file) [PROFILE_SUPPORTS_FOREIGN_NEWLINES]: Look
for \r and treat it as a line break.
* prof_int.h: Don't include prof_err.h.
(PROFILE_SUPPORTS_FOREIGN_NEWLINES) [macintosh]: Define new macro.


To generate a diff of this commit:



cvs diff -r1.123 -r1.124 krb5/src/util/profile/ChangeLog
cvs diff -r1.27 -r1.28 krb5/src/util/profile/prof_int.h
cvs diff -r1.20 -r1.21 krb5/src/util/profile/prof_parse.c
From: raeburn@mit.edu
Subject: CVS Commit
Use passwd entry for ~ expansion if $HOME isn't set.
Also fix a minor logic bug in checking file access.


To generate a diff of this commit:



cvs diff -r1.126 -r1.127 krb5/src/util/profile/ChangeLog
cvs diff -r1.19 -r1.20 krb5/src/util/profile/configure.in
cvs diff -r1.28 -r1.29 krb5/src/util/profile/prof_file.c
Still to do: Check the lock-handling logic in the case where the on-disk
file has been updated and needs to be re-read.
Yes, the locking model needs fixing.

profile_update_file_data can free and then create data->root, but
data->root isn't protected by the mutex, so another thread using a
different prf_file_t handle may be reading it while it's being freed.

I suspect the right fix is going to involve changing the keying of the
linked list to be by timestamp as well as by name. Need to think
through how that's going to affect the update_file part.

For now, what's there should work just fine as long as the config file
isn't modified while a process is using it in multiple threads.
The locking bug is filed as 1312, and won't block the 1.3 release.
The merge itself is done, so closing this out....