Skip to contentSkip to conversation

more gcc3.4 inline fixes [9/10] [3/4]

PATCH In review O.Sezer 2 participants 2 messages Aug 23, 2004 – Aug 25, 2004

lore
Share & tools
lore

O.Sezer

author
#0 lore raw

PATCH 1/1 more gcc3.4 inline fixes [9/10] [3/4]

splitted-up the fs/* gcc3.4-inline-patches.

[3/4] intermezzo, while we're here

fs/intermezzo/file.c renamed from fs/intermezzo/file.c~ +6 -3
@@ -78,16 +78,19 @@
         pathlen = MYPATHLEN(buffer, path);
         
         CDEBUG(D_FILE, "de %p, dd %p\n", de, dd);
+
         if (dd->remote_ino == 0) {
                 rc = presto_get_fileid(minor, fset, de);
+                if (dd->remote_ino == 0)
+                        CERROR("get_fileid failed %d, ino: %Lx, fetching by name\n", rc,
+                               dd->remote_ino);
+
         }
         memset (&info, 0, sizeof(info));
         if (dd->remote_ino > 0) {
                 info.remote_ino = dd->remote_ino;
                 info.remote_generation = dd->remote_generation;
-        } else
-                CERROR("get_fileid failed %d, ino: %Lx, fetching by name\n", rc,
-                       dd->remote_ino);
+        }
 
         rc = izo_upc_open(minor, pathlen, path, fset->fset_name, &info);
         PRESTO_FREE(buffer, PAGE_SIZE);

=== http://marc.theaimsgroup.com/?l=bk-commits-head&m=105399886001079&w=2

fs/intermezzo/methods.c renamed from fs/intermezzo/methods.c~ +1 -1
@@ -254,8 +254,8 @@
         if (ops == NULL) {
                 CERROR("prepare to die: unrecognized cache type for Filter\n");
         }
-        return ops;
         FEXIT;
+        return ops;
 }
 
 
fs/intermezzo/journal_xfs.c renamed from fs/intermezzo/journal_xfs.c~ +1 -1
@@ -58,7 +57,7 @@
         VFS_STATVFS(vfsp, &stat, NULL, rc);
         avail = statp.f_bfree;
 
-        return sbp->sb_fdblocks;; 
+        return sbp->sb_fdblocks;
 #endif
         return 0x0fffffff;
 }
fs/intermezzo/psdev.c renamed from fs/intermezzo/psdev.c~ +6 -1
@@ -564,6 +564,10 @@
         buffer->u_uniq = req->rq_unique;
         buffer->u_async = async;
 
+        /* Remove potential datarace possibility*/
+        if ( async ) 
+                req->rq_flags = REQ_ASYNC;
+
         spin_lock(&channel->uc_lock); 
         /* Append msg to pending queue and poke Lento. */
         list_add(&req->rq_chain, channel->uc_pending.prev);
@@ -576,7 +580,7 @@
 
         if ( async ) {
                 /* req, rq_data are freed in presto_psdev_read for async */
-                req->rq_flags = REQ_ASYNC;
+                /* req->rq_flags = REQ_ASYNC;*/
                 EXIT;
                 return 0;
         }
@@ -647,5 +651,6 @@
 exit_req:
         PRESTO_FREE(req, sizeof(struct upc_req));
 exit_buf:
+        PRESTO_FREE(buffer,*size);
         return error;
 }
#1 lore raw
Quoted 5 lines · O.Sezer

splitted-up the fs/* gcc3.4-inline-patches.

[3/4] intermezzo, while we're here

Ozkan,

What is this about?

I can't understand this as trivial gcc3.4 inline fixes.

Quoted 78 lines
fs/intermezzo/file.c renamed from fs/intermezzo/file.c~ +6 -3
@@ -78,16 +78,19 @@
         pathlen = MYPATHLEN(buffer, path);
 
         CDEBUG(D_FILE, "de %p, dd %p\n", de, dd);
+
         if (dd->remote_ino == 0) {
                 rc = presto_get_fileid(minor, fset, de);
+                if (dd->remote_ino == 0)
+                        CERROR("get_fileid failed %d, ino: %Lx, fetching by name\n", rc,
+                               dd->remote_ino);
+
         }
         memset (&info, 0, sizeof(info));
         if (dd->remote_ino > 0) {
                 info.remote_ino = dd->remote_ino;
                 info.remote_generation = dd->remote_generation;
-        } else
-                CERROR("get_fileid failed %d, ino: %Lx, fetching by name\n", rc,
-                       dd->remote_ino);
+        }
 
         rc = izo_upc_open(minor, pathlen, path, fset->fset_name, &info);
         PRESTO_FREE(buffer, PAGE_SIZE);

=== http://marc.theaimsgroup.com/?l=bk-commits-head&m=105399886001079&w=2

fs/intermezzo/methods.c renamed from fs/intermezzo/methods.c~ +1 -1
@@ -254,8 +254,8 @@
         if (ops == NULL) {
                 CERROR("prepare to die: unrecognized cache type for Filter\n");
         }
-        return ops;
         FEXIT;
+        return ops;
 }
 
 
fs/intermezzo/journal_xfs.c renamed from fs/intermezzo/journal_xfs.c~ +1 -1
@@ -58,7 +57,7 @@
         VFS_STATVFS(vfsp, &stat, NULL, rc);
         avail = statp.f_bfree;
 
-        return sbp->sb_fdblocks;; 
+        return sbp->sb_fdblocks;
 #endif
         return 0x0fffffff;
 }
fs/intermezzo/psdev.c renamed from fs/intermezzo/psdev.c~ +6 -1
@@ -564,6 +564,10 @@
         buffer->u_uniq = req->rq_unique;
         buffer->u_async = async;
 
+        /* Remove potential datarace possibility*/
+        if ( async ) 
+                req->rq_flags = REQ_ASYNC;
+
         spin_lock(&channel->uc_lock); 
         /* Append msg to pending queue and poke Lento. */
         list_add(&req->rq_chain, channel->uc_pending.prev);
@@ -576,7 +580,7 @@
 
         if ( async ) {
                 /* req, rq_data are freed in presto_psdev_read for async */
-                req->rq_flags = REQ_ASYNC;
+                /* req->rq_flags = REQ_ASYNC;*/
                 EXIT;
                 return 0;
         }
@@ -647,5 +651,6 @@
 exit_req:
         PRESTO_FREE(req, sizeof(struct upc_req));
 exit_buf:
+        PRESTO_FREE(buffer,*size);
         return error;
 }