[Cluster-devel] cluster/gfs2 edit/hexedit.h fsck/initialize.c ...

2007-11-13 Thread rpeterso
CVSROOT:/cvs/cluster
Module name:cluster
Branch: RHEL5
Changes by: [EMAIL PROTECTED]   2007-11-13 17:06:33

Modified files:
gfs2/edit  : hexedit.h 
gfs2/fsck  : initialize.c util.h 
gfs2/libgfs2   : buf.c libgfs2.h misc.c 
gfs2/mkfs  : gfs2_mkfs.h 
gfs2/quota : check.c gfs2_quota.h main.c 
gfs2/tool  : Makefile gfs2_tool.h main.c sb.c 
Removed files:
gfs2/tool  : util.c 

Log message:
Resolves: bz 364741: GFS2: gfs2_quota doesn't work unless lock
table specified

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/edit/hexedit.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.4&r2=1.4.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/initialize.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.6.2.4&r2=1.6.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/util.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/buf.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.3&r2=1.3.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/libgfs2.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.7.2.14&r2=1.7.2.15
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/misc.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.2.3&r2=1.2.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mkfs/gfs2_mkfs.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.9&r2=1.9.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/quota/check.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.2.4&r2=1.2.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/quota/gfs2_quota.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.4&r2=1.1.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/quota/main.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.2.6&r2=1.2.2.7
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/Makefile.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.5.2.1&r2=1.5.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/gfs2_tool.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.5.2.4&r2=1.5.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/main.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.2&r2=1.4.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/sb.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.2.1&r2=1.2.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/util.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.5.2.3&r2=NONE

--- cluster/gfs2/edit/hexedit.h 2007/10/11 20:32:35 1.4.2.4
+++ cluster/gfs2/edit/hexedit.h 2007/11/13 17:06:32 1.4.2.5
@@ -178,31 +178,6 @@
 #define SCREEN_HEIGHT   (16)
 #define SCREEN_WIDTH(16)
 
-/*  I/O macros  */
-
-#define do_lseek(fd, off) \
-{ \
-  if (lseek((fd), (off), SEEK_SET) != (off)) \
-die("bad seek: %s on line %d of file %s\n", \
-   strerror(errno),__LINE__, __FILE__); \
-}
-
-#define do_read(fd, buff, len) \
-{ \
-  if (read((fd), (buff), (len)) != (len)) \
-die("bad read: %s on line %d of file %s\n", \
-   strerror(errno), __LINE__, __FILE__); \
-}
-
-#define do_write(fd, buff, len) \
-{ \
-  if (write((fd), (buff), (len)) != (len)) \
-die("bad write: %s on line %d of file %s\n", \
-   strerror(errno), __LINE__, __FILE__); \
-}
-
-
-
 /*  Memory macros  */
 
 #define type_zalloc(ptr, type, count) \
--- cluster/gfs2/fsck/initialize.c  2007/10/19 15:07:58 1.6.2.4
+++ cluster/gfs2/fsck/initialize.c  2007/11/13 17:06:32 1.6.2.5
@@ -169,7 +169,7 @@
last_data_block = rmax;
first_data_block = rmin;
 
-   if(do_lseek(sdp->device_fd, (last_fs_block * sdp->sd_sb.sb_bsize))){
+   if(fsck_lseek(sdp->device_fd, (last_fs_block * sdp->sd_sb.sb_bsize))){
log_crit("Can't seek to last block in file system: %"
 PRIu64" (0x%" PRIx64 ")\n", last_fs_block, 
last_fs_block);
goto fail;
--- cluster/gfs2/fsck/util.h2006/06/06 14:49:31 1.2
+++ cluster/gfs2/fsck/util.h2007/11/13 17:06:32 1.2.2.1
@@ -16,16 +16,9 @@
 
 #include "libgfs2.h"
 
-#define do_lseek(fd, off) \
+#define fsck_lseek(fd, off) \
   ((lseek((fd), (off), SEEK_SET) == (off)) ? 0 : -1)
 
-#define do_read(fd, buff, len) \
-  ((read((fd), (buff), (len)) == (len)) ? 0 : -1)
-
-#define do_write(fd, buff, len) \
-  ((write((fd), (buff), (len)) == (len)) ? 0 : -1)
-
-
 int compute_height(struct gfs2_sbd *sdp, uint64_t sz);
 struct di_info *search_list(osi_list_t *list, uint64_t addr);
 void warm_fuzzy_stuff(uint64_t block);
--- cluster/gfs2/libgfs2/buf.c  2006/06/08 21:02:15 1.3
+++ cluster/gfs2/libgfs2/buf.c  2007/11/13 17:06:32 1.3.2.1
@@ -25,27 +25,6 @@
 
 #include "libgfs2.h"
 
-#define do_lseek(sdp, off) \
-do { \
-   if (lseek((sdp)->device_fd, (off), SEEK_SET) != (off)) \
-   die("bad seek: %s on line %d of file %s\n", \
-   strerror(errno)

[Cluster-devel] cluster/gfs2 edit/hexedit.h fsck/initialize.c ...

2007-11-13 Thread rpeterso
CVSROOT:/cvs/cluster
Module name:cluster
Changes by: [EMAIL PROTECTED]   2007-11-13 17:03:41

Modified files:
gfs2/edit  : hexedit.h 
gfs2/fsck  : initialize.c util.h 
gfs2/libgfs2   : buf.c libgfs2.h misc.c 
gfs2/mkfs  : gfs2_mkfs.h 
gfs2/quota : check.c gfs2_quota.h main.c 
gfs2/tool  : Makefile gfs2_tool.h main.c sb.c 
Removed files:
gfs2/tool  : util.c 

Log message:
Resolves: bz 364741: GFS2: gfs2_quota doesn't work unless lock
table specified

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/edit/hexedit.h.diff?cvsroot=cluster&r1=1.12&r2=1.13
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/initialize.c.diff?cvsroot=cluster&r1=1.10&r2=1.11
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/fsck/util.h.diff?cvsroot=cluster&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/buf.c.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/libgfs2.h.diff?cvsroot=cluster&r1=1.21&r2=1.22
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/libgfs2/misc.c.diff?cvsroot=cluster&r1=1.5&r2=1.6
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mkfs/gfs2_mkfs.h.diff?cvsroot=cluster&r1=1.9&r2=1.10
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/quota/check.c.diff?cvsroot=cluster&r1=1.6&r2=1.7
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/quota/gfs2_quota.h.diff?cvsroot=cluster&r1=1.5&r2=1.6
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/quota/main.c.diff?cvsroot=cluster&r1=1.9&r2=1.10
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/Makefile.diff?cvsroot=cluster&r1=1.14&r2=1.15
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/gfs2_tool.h.diff?cvsroot=cluster&r1=1.9&r2=1.10
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/main.c.diff?cvsroot=cluster&r1=1.7&r2=1.8
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/sb.c.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/tool/util.c.diff?cvsroot=cluster&r1=1.8&r2=NONE

--- cluster/gfs2/edit/hexedit.h 2007/10/18 19:56:41 1.12
+++ cluster/gfs2/edit/hexedit.h 2007/11/13 17:03:39 1.13
@@ -197,31 +197,6 @@
 #define SCREEN_HEIGHT   (16)
 #define SCREEN_WIDTH(16)
 
-/*  I/O macros  */
-
-#define do_lseek(fd, off) \
-{ \
-  if (lseek((fd), (off), SEEK_SET) != (off)) \
-die("bad seek: %s on line %d of file %s\n", \
-   strerror(errno),__LINE__, __FILE__); \
-}
-
-#define do_read(fd, buff, len) \
-{ \
-  if (read((fd), (buff), (len)) != (len)) \
-die("bad read: %s on line %d of file %s\n", \
-   strerror(errno), __LINE__, __FILE__); \
-}
-
-#define do_write(fd, buff, len) \
-{ \
-  if (write((fd), (buff), (len)) != (len)) \
-die("bad write: %s on line %d of file %s\n", \
-   strerror(errno), __LINE__, __FILE__); \
-}
-
-
-
 /*  Memory macros  */
 
 #define type_zalloc(ptr, type, count) \
--- cluster/gfs2/fsck/initialize.c  2007/10/19 15:06:56 1.10
+++ cluster/gfs2/fsck/initialize.c  2007/11/13 17:03:40 1.11
@@ -169,7 +169,7 @@
last_data_block = rmax;
first_data_block = rmin;
 
-   if(do_lseek(sdp->device_fd, (last_fs_block * sdp->sd_sb.sb_bsize))){
+   if(fsck_lseek(sdp->device_fd, (last_fs_block * sdp->sd_sb.sb_bsize))){
log_crit("Can't seek to last block in file system: %"
 PRIu64" (0x%" PRIx64 ")\n", last_fs_block, 
last_fs_block);
goto fail;
--- cluster/gfs2/fsck/util.h2006/06/06 14:49:31 1.2
+++ cluster/gfs2/fsck/util.h2007/11/13 17:03:40 1.3
@@ -16,16 +16,9 @@
 
 #include "libgfs2.h"
 
-#define do_lseek(fd, off) \
+#define fsck_lseek(fd, off) \
   ((lseek((fd), (off), SEEK_SET) == (off)) ? 0 : -1)
 
-#define do_read(fd, buff, len) \
-  ((read((fd), (buff), (len)) == (len)) ? 0 : -1)
-
-#define do_write(fd, buff, len) \
-  ((write((fd), (buff), (len)) == (len)) ? 0 : -1)
-
-
 int compute_height(struct gfs2_sbd *sdp, uint64_t sz);
 struct di_info *search_list(osi_list_t *list, uint64_t addr);
 void warm_fuzzy_stuff(uint64_t block);
--- cluster/gfs2/libgfs2/buf.c  2006/06/08 21:02:15 1.3
+++ cluster/gfs2/libgfs2/buf.c  2007/11/13 17:03:40 1.4
@@ -25,27 +25,6 @@
 
 #include "libgfs2.h"
 
-#define do_lseek(sdp, off) \
-do { \
-   if (lseek((sdp)->device_fd, (off), SEEK_SET) != (off)) \
-   die("bad seek: %s on line %d of file %s\n", \
-   strerror(errno), __LINE__, __FILE__); \
-} while (0)
-
-#define do_read(sdp, buf, len) \
-do { \
-   if (read((sdp)->device_fd, (buf), (len)) != (len)) \
-   die("bad read: %s on line %d of file %s\n", \
-   strerror(errno), __LINE__, __FILE__); \
-} while (0)
-
-#define do_write(sdp, buf, len) \
-do { \
-   if (write((sdp)->device_fd, (buf), (len)) != (len)) \
-   die("bad write: %s on line %d of fil