s3:include: change lock_struct->fnum to uint64_t
authorMichael Adam <obnox@samba.org>
Wed, 6 Jun 2012 13:42:48 +0000 (15:42 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 6 Jun 2012 21:21:59 +0000 (23:21 +0200)
Note: this changes the format of brlock.tdb!

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Jun  6 23:22:00 CEST 2012 on sn-devel-104

source3/include/locking.h
source3/locking/brlock.c
source3/locking/locking.c
source3/locking/posix.c

index 8ece11c920f7e9631c51355591094c5e66adbd11..32593af1818c791dd3ac1693c3c20fd39d35592f 100644 (file)
@@ -66,7 +66,7 @@ struct lock_struct {
        struct lock_context context;
        br_off start;
        br_off size;
-       uint16 fnum;
+       uint64_t fnum;
        enum brl_type lock_type;
        enum brl_flavour lock_flav;
 };
index adf1f5194c88099e304a29d95d6978d568619a54..b82914a0f8cd8fd38b7755583faf71c26c0424e9 100644 (file)
@@ -54,10 +54,10 @@ static void print_lock_struct(unsigned int i, struct lock_struct *pls)
                        (unsigned int)pls->context.tid,
                        server_id_str(talloc_tos(), &pls->context.pid) ));
 
-       DEBUG(10,("start = %.0f, size = %.0f, fnum = %d, %s %s\n",
+       DEBUG(10,("start = %.0f, size = %.0f, fnum = %llu, %s %s\n",
                (double)pls->start,
                (double)pls->size,
-               pls->fnum,
+               (unsigned long long)pls->fnum,
                lock_type_name(pls->lock_type),
                lock_flav_name(pls->lock_flav) ));
 }
index 5da759573728d8e64b2b658eb90f1e327ea76305..55537022749638087ffe22fd54db0d068e7f0d8b 100644 (file)
@@ -154,11 +154,11 @@ bool strict_lock_default(files_struct *fsp, struct lock_struct *plock)
        }
 
        DEBUG(10,("strict_lock_default: flavour = %s brl start=%.0f "
-                       "len=%.0f %s for fnum %d file %s\n",
+                       "len=%.0f %s for fnum %llu file %s\n",
                        lock_flav_name(plock->lock_flav),
                        (double)plock->start, (double)plock->size,
                        ret ? "unlocked" : "locked",
-                       plock->fnum, fsp_str_dbg(fsp)));
+                       (unsigned long long)plock->fnum, fsp_str_dbg(fsp)));
 
        return ret;
 }
index 557099b2d8062febebef993e061c12619452a1a0..2a274f9a0007be54e9feea48f3a34201f6d18d11 100644 (file)
@@ -791,7 +791,8 @@ static struct lock_list *posix_lock_list(TALLOC_CTX *ctx,
 
                for (l_curr = lhead; l_curr;) {
 
-                       DEBUG(10,("posix_lock_list: lock: fnum=%d: start=%.0f,size=%.0f:type=%s", lock->fnum,
+                       DEBUG(10,("posix_lock_list: lock: fnum=%llu: start=%.0f,size=%.0f:type=%s",
+                               (unsigned long long)lock->fnum,
                                (double)lock->start, (double)lock->size, posix_lock_type_name(lock->lock_type) ));
 
                        if ( (l_curr->start >= (lock->start + lock->size)) ||