]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
afs: Remove callback details from afs_callback_break struct
authorDavid Howells <dhowells@redhat.com>
Fri, 19 Oct 2018 23:57:58 +0000 (00:57 +0100)
committerDavid Howells <dhowells@redhat.com>
Tue, 23 Oct 2018 23:41:08 +0000 (00:41 +0100)
Remove unnecessary details of a broken callback, such as version, expiry
and type, from the afs_callback_break struct as they're not actually used
and make the list take more memory.

Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/afs.h
fs/afs/callback.c
fs/afs/cmservice.c

index c23b31b742fa8f2464254213ca0d27628b408500..fb9bcb8758eaa8e47d6f6d6c7b6e7f5b6de4fa74 100644 (file)
@@ -75,7 +75,7 @@ struct afs_callback {
 
 struct afs_callback_break {
        struct afs_fid          fid;            /* File identifier */
-       struct afs_callback     cb;             /* Callback details */
+       //struct afs_callback   cb;             /* Callback details */
 };
 
 #define AFSCBMAX 50    /* maximum callbacks transferred per bulk op */
index 8698198ad4279e7ffcd6d54f7c3f8a58fd607af5..df9bfee698ad3eddc8d53c1dcbea7805438c06d2 100644 (file)
@@ -310,14 +310,10 @@ void afs_break_callbacks(struct afs_server *server, size_t count,
        /* TODO: Sort the callback break list by volume ID */
 
        for (; count > 0; callbacks++, count--) {
-               _debug("- Fid { vl=%08llx n=%llu u=%u }  CB { v=%u x=%u t=%u }",
+               _debug("- Fid { vl=%08llx n=%llu u=%u }",
                       callbacks->fid.vid,
                       callbacks->fid.vnode,
-                      callbacks->fid.unique,
-                      callbacks->cb.version,
-                      callbacks->cb.expiry,
-                      callbacks->cb.type
-                      );
+                      callbacks->fid.unique);
                afs_break_one_callback(server, &callbacks->fid);
        }
 
index 186f621f872212ba8776a9aea9eec4777a192794..fc0010d800a0d4023147628ef0f64f31c8439601 100644 (file)
@@ -218,7 +218,6 @@ static int afs_deliver_cb_callback(struct afs_call *call)
                        cb->fid.vid     = ntohl(*bp++);
                        cb->fid.vnode   = ntohl(*bp++);
                        cb->fid.unique  = ntohl(*bp++);
-                       cb->cb.type     = AFSCM_CB_UNTYPED;
                }
 
                afs_extract_to_tmp(call);
@@ -236,24 +235,18 @@ static int afs_deliver_cb_callback(struct afs_call *call)
                if (call->count2 != call->count && call->count2 != 0)
                        return afs_protocol_error(call, -EBADMSG,
                                                  afs_eproto_cb_count);
-               afs_extract_to_buf(call, call->count2 * 3 * 4);
+               call->_iter = &call->iter;
+               iov_iter_discard(&call->iter, READ, call->count2 * 3 * 4);
                call->unmarshall++;
 
        case 4:
-               _debug("extract CB array");
+               _debug("extract discard %zu/%u",
+                      iov_iter_count(&call->iter), call->count2 * 3 * 4);
+
                ret = afs_extract_data(call, false);
                if (ret < 0)
                        return ret;
 
-               _debug("unmarshall CB array");
-               cb = call->request;
-               bp = call->buffer;
-               for (loop = call->count2; loop > 0; loop--, cb++) {
-                       cb->cb.version  = ntohl(*bp++);
-                       cb->cb.expiry   = ntohl(*bp++);
-                       cb->cb.type     = ntohl(*bp++);
-               }
-
                call->unmarshall++;
        case 5:
                break;