[prev in list] [next in list] [prev in thread] [next in thread] 

List:       subversion-cvs
Subject:    svn commit: r17560 - trunk/subversion/libsvn_fs_fs
From:       malcolm () tigris ! org
Date:       2005-11-29 23:20:08
Message-ID: 200511300008.jAU08vQ07472 () morbius ! ch ! collab ! net
[Download RAW message or body]

Author: malcolm
Date: Tue Nov 29 18:08:56 2005
New Revision: 17560

Modified:
   trunk/subversion/libsvn_fs_fs/fs_fs.c

Log:
FSFS: Remove APR file buffering from cases where it's not needed -
where we open a file, perform a single read or write operation, and then
immediately close the file again.

* subversion/libsvn_fs_fs/fs_fs.c
  (svn_fs_fs__open): Remove the APR_BUFFERED flag from what is,
    essentially, an existence check for the 'current' file (we don't
    read or write the file at all, just close it).
  (get_youngest): Remove the APR_BUFFERED flag: we read the complete
    contents of the 'current' file in a single read.
  (svn_fs_fs__create_txn, write_next_ids, svn_fs_fs__set_entry): Remove
    the APR_BUFFERED flag: in each case we open a file only to perform
    a single write, via svn_stream_printf().


Modified: trunk/subversion/libsvn_fs_fs/fs_fs.c
Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=17560 \
&p1=trunk/subversion/libsvn_fs_fs/fs_fs.c&p2=trunk/subversion/libsvn_fs_fs/fs_fs.c&r1=17559&r2=17560
 ==============================================================================
--- trunk/subversion/libsvn_fs_fs/fs_fs.c	(original)
+++ trunk/subversion/libsvn_fs_fs/fs_fs.c	Tue Nov 29 18:08:56 2005
@@ -291,7 +291,7 @@
      isn't much need for specific state associated with an open fs_fs
      repository. */
   SVN_ERR (svn_io_file_open (&current_file, path_current (fs, pool),
-                             APR_READ | APR_BUFFERED, APR_OS_DEFAULT, pool));
+                             APR_READ, APR_OS_DEFAULT, pool));
   SVN_ERR (svn_io_file_close (current_file, pool));
 
   /* Read the FS format number. */
@@ -328,7 +328,7 @@
 
   SVN_ERR (svn_io_file_open (&current_file,
                              svn_path_join (fs_path, PATH_CURRENT, pool),
-                             APR_READ | APR_BUFFERED, APR_OS_DEFAULT, pool));
+                             APR_READ, APR_OS_DEFAULT, pool));
 
   len = sizeof (buf);
   SVN_ERR (svn_io_file_read (current_file, buf, &len, pool));
@@ -2490,8 +2490,8 @@
   /* Write the next-ids file. */
   SVN_ERR (svn_io_file_open (&next_ids_file,
                              path_txn_next_ids (fs, txn->id, pool),
-                             APR_WRITE | APR_CREATE | APR_TRUNCATE
-                             | APR_BUFFERED, APR_OS_DEFAULT, pool));
+                             APR_WRITE | APR_CREATE | APR_TRUNCATE,
+                             APR_OS_DEFAULT, pool));
 
   next_ids_stream = svn_stream_from_aprfile (next_ids_file, pool);
 
@@ -2595,7 +2595,7 @@
   svn_stream_t *out_stream;
 
   SVN_ERR (svn_io_file_open (&file, path_txn_next_ids (fs, txn_id, pool),
-                             APR_WRITE | APR_TRUNCATE | APR_BUFFERED,
+                             APR_WRITE | APR_TRUNCATE,
                              APR_OS_DEFAULT, pool));
 
   out_stream = svn_stream_from_aprfile (file, pool);
@@ -2818,8 +2818,8 @@
   else
     {
       /* The directory rep is already mutable, so just open it for append. */
-      SVN_ERR (svn_io_file_open (&file, filename, APR_WRITE | APR_APPEND
-                                 | APR_BUFFERED, APR_OS_DEFAULT, pool));
+      SVN_ERR (svn_io_file_open (&file, filename, APR_WRITE | APR_APPEND,
+                                 APR_OS_DEFAULT, pool));
       out = svn_stream_from_aprfile (file, pool);
     }
 

---------------------------------------------------------------------
To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
For additional commands, e-mail: svn-help@subversion.tigris.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic