[DRBD-cvs] r1523 - in plus-branches/01-wait-sync-target: .
documentation drbd drbd/linux scripts user
svn at svn.drbd.org
svn at svn.drbd.org
Tue Aug 31 14:08:32 CEST 2004
Author: phil
Date: 2004-08-31 14:08:29 +0200 (Tue, 31 Aug 2004)
New Revision: 1523
Modified:
plus-branches/01-wait-sync-target/
plus-branches/01-wait-sync-target/documentation/Makefile
plus-branches/01-wait-sync-target/documentation/Makefile.lang
plus-branches/01-wait-sync-target/drbd/Makefile
plus-branches/01-wait-sync-target/drbd/drbd_compat_wrappers.h
plus-branches/01-wait-sync-target/drbd/drbd_fs.c
plus-branches/01-wait-sync-target/drbd/drbd_int.h
plus-branches/01-wait-sync-target/drbd/drbd_main.c
plus-branches/01-wait-sync-target/drbd/linux/drbd.h
plus-branches/01-wait-sync-target/drbd/linux/drbd_config.h
plus-branches/01-wait-sync-target/scripts/Makefile
plus-branches/01-wait-sync-target/scripts/adjust_drbd_config_h.sh
plus-branches/01-wait-sync-target/user/drbdsetup.c
Log:
svnp run. Investigated 1518 to 1523
Property changes on: plus-branches/01-wait-sync-target
___________________________________________________________________
Name: propagate:at
- 1518
+ 1523
Modified: plus-branches/01-wait-sync-target/documentation/Makefile
===================================================================
--- plus-branches/01-wait-sync-target/documentation/Makefile 2004-08-31 12:07:15 UTC (rev 1522)
+++ plus-branches/01-wait-sync-target/documentation/Makefile 2004-08-31 12:08:29 UTC (rev 1523)
@@ -139,16 +139,16 @@
@ok=true; for f in $(MANPAGES) ; \
do [ -e $$f ] || { echo $$f missing ; ok=false; } ; \
done ; $$ok
- @ set -e; for f in $(MANPAGES) ; do \
+ set -e; for f in $(MANPAGES) ; do \
s=$${f##*.}; \
- install -v -D -m 644 $$f $(PREFIX)usr/share/man/man$$s/$$f ; \
+ install -v -D -m 644 $$f $(PREFIX)/usr/share/man/man$$s/$$f ; \
done
@ set -e; for i in $(LANGS); do $(MAKE) -C $$i install; done
uninstall:
@ set -e; for f in $(MANPAGES) ; do \
s=$${f##*.}; \
- rm -v $(PREFIX)usr/share/man/man$$s/$$f ; \
+ rm -v $(PREFIX)/usr/share/man/man$$s/$$f ; \
done
@ set -e; for i in $(LANGS); do $(MAKE) -C $$i uninstall; done
Modified: plus-branches/01-wait-sync-target/documentation/Makefile.lang
===================================================================
--- plus-branches/01-wait-sync-target/documentation/Makefile.lang 2004-08-31 12:07:15 UTC (rev 1522)
+++ plus-branches/01-wait-sync-target/documentation/Makefile.lang 2004-08-31 12:08:29 UTC (rev 1523)
@@ -93,14 +93,14 @@
rm -f *.ps.gz *.pdf *.ps *.html
install:
- install -D -m 644 drbdsetup.8 $(PREFIX)usr/share/man/$(C_LANG)/man8/drbdsetup.8
- install -D -m 644 drbd.conf.5 $(PREFIX)usr/share/man/$(C_LANG)/man5/drbd.conf.5
- install -D -m 644 drbd.8 $(PREFIX)usr/share/man/$(C_LANG)/man8/drbd.8
+ install -D -m 644 drbdsetup.8 $(PREFIX)/usr/share/man/$(C_LANG)/man8/drbdsetup.8
+ install -D -m 644 drbd.conf.5 $(PREFIX)/usr/share/man/$(C_LANG)/man5/drbd.conf.5
+ install -D -m 644 drbd.8 $(PREFIX)/usr/share/man/$(C_LANG)/man8/drbd.8
uninstall:
- rm $(PREFIX)usr/share/man/$(C_LANG)/man8/drbdsetup.8
- rm $(PREFIX)usr/share/man/$(C_LANG)/man5/drbd.conf.5
- rm $(PREFIX)usr/share/man/$(C_LANG)/man8/drbd.8
+ rm $(PREFIX)/usr/share/man/$(C_LANG)/man8/drbdsetup.8
+ rm $(PREFIX)/usr/share/man/$(C_LANG)/man5/drbd.conf.5
+ rm $(PREFIX)/usr/share/man/$(C_LANG)/man8/drbd.8
html: $(shell ls *.sgml | sed s/sgml/html/g)
pdf: $(shell ls *.sgml | sed s/sgml/pdf/g)
Modified: plus-branches/01-wait-sync-target/drbd/Makefile
===================================================================
--- plus-branches/01-wait-sync-target/drbd/Makefile 2004-08-31 12:07:15 UTC (rev 1522)
+++ plus-branches/01-wait-sync-target/drbd/Makefile 2004-08-31 12:08:29 UTC (rev 1523)
@@ -148,9 +148,9 @@
@if ! [ -e $(MODOBJ) ] ; then \
echo "No $(MODOBJ): nothing to install??"; false ; \
fi
- install -d $(PREFIX)var/lib/drbd
- install -d $(PREFIX)lib/modules/$(KERNELRELEASE)/$(MODSUBDIR)
- install -m 644 $(MODOBJ) $(PREFIX)lib/modules/$(KERNELRELEASE)/$(MODSUBDIR)
+# install -d $(PREFIX)/var/lib/drbd
+ install -d $(PREFIX)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR)
+ install -m 644 $(MODOBJ) $(PREFIX)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR)
ifeq ($(shell uname -r),$(KERNELRELEASE))
/sbin/depmod -a || /sbin/depmod -e $(MODOBJ) 2>&1 >/dev/null || true
else
Modified: plus-branches/01-wait-sync-target/drbd/drbd_compat_wrappers.h
===================================================================
--- plus-branches/01-wait-sync-target/drbd/drbd_compat_wrappers.h 2004-08-31 12:07:15 UTC (rev 1522)
+++ plus-branches/01-wait-sync-target/drbd/drbd_compat_wrappers.h 2004-08-31 12:08:29 UTC (rev 1523)
@@ -366,7 +366,7 @@
static inline void drbd_set_my_capacity(drbd_dev *mdev, sector_t size)
{
set_capacity(mdev->vdisk,size);
- mdev->this_bdev->bd_inode->i_size = (loff_t)size << 9;
+ mdev->this_bdev->bd_inode->i_size = ((loff_t)size) << 9;
}
//#warning "FIXME why don't we care for the return value?"
Modified: plus-branches/01-wait-sync-target/drbd/drbd_fs.c
===================================================================
--- plus-branches/01-wait-sync-target/drbd/drbd_fs.c 2004-08-31 12:07:15 UTC (rev 1522)
+++ plus-branches/01-wait-sync-target/drbd/drbd_fs.c 2004-08-31 12:08:29 UTC (rev 1523)
@@ -366,6 +366,11 @@
goto release_bdev2_fail_ioctl;
}
+ if (drbd_get_capacity(bdev) > DRBD_MAX_SECTORS) {
+ retcode = LDDeviceTooLarge;
+ goto release_bdev2_fail_ioctl;
+ }
+
if ( new_conf.meta_index == -1 ) i = 1;
else i = new_conf.meta_index+1;
Modified: plus-branches/01-wait-sync-target/drbd/drbd_int.h
===================================================================
--- plus-branches/01-wait-sync-target/drbd/drbd_int.h 2004-08-31 12:07:15 UTC (rev 1522)
+++ plus-branches/01-wait-sync-target/drbd/drbd_int.h 2004-08-31 12:08:29 UTC (rev 1523)
@@ -77,6 +77,12 @@
# warning "FIXME. DRBD_MAJOR is now officially defined in major.h"
#endif
+/* FIXME because of code leftovers from previous times,
+ * currently our code gets heavily confused for device sizes larger
+ * than 2TB, so refuse to configure devices of that size.
+ */
+#define DRBD_MAX_SECTORS (0xffffffffLU)
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
/*lge: this hack is to get rid of the compiler warnings about
* 'do_nbd_request declared static but never defined'
Modified: plus-branches/01-wait-sync-target/drbd/drbd_main.c
===================================================================
--- plus-branches/01-wait-sync-target/drbd/drbd_main.c 2004-08-31 12:07:15 UTC (rev 1522)
+++ plus-branches/01-wait-sync-target/drbd/drbd_main.c 2004-08-31 12:08:29 UTC (rev 1523)
@@ -903,12 +903,36 @@
return ret;
}
+#ifdef DRBD_DISABLE_SENDPAGE
int _drbd_send_page(drbd_dev *mdev, struct page *page,
int offset, size_t size)
{
int sent,ok;
int len = size;
+ spin_lock(&mdev->send_task_lock);
+ mdev->send_task=current;
+ spin_unlock(&mdev->send_task_lock);
+
+ sent = _drbd_no_send_page(mdev, page, offset, size);
+ if (likely(sent > 0)) len -= sent;
+
+ spin_lock(&mdev->send_task_lock);
+ mdev->send_task=NULL;
+ spin_unlock(&mdev->send_task_lock);
+
+ ok = (len == 0);
+ if (likely(ok))
+ mdev->send_cnt += size>>9;
+ return ok;
+}
+#else
+int _drbd_send_page(drbd_dev *mdev, struct page *page,
+ int offset, size_t size)
+{
+ int sent,ok;
+ int len = size;
+
#ifdef SHOW_SENDPAGE_USAGE
unsigned long now = jiffies;
static unsigned long total = 0;
@@ -980,6 +1004,7 @@
mdev->send_cnt += size>>9;
return ok;
}
+#endif
// Used to send write requests: bh->b_rsector !!
int drbd_send_dblock(drbd_dev *mdev, drbd_request_t *req)
Modified: plus-branches/01-wait-sync-target/drbd/linux/drbd.h
===================================================================
--- plus-branches/01-wait-sync-target/drbd/linux/drbd.h 2004-08-31 12:07:15 UTC (rev 1522)
+++ plus-branches/01-wait-sync-target/drbd/linux/drbd.h 2004-08-31 12:08:29 UTC (rev 1523)
@@ -100,6 +100,8 @@
int al_extents;
};
+/* KEEP the order, do not delete or insert!
+ * Or change the API_VERSION, too. */
enum ret_codes {
NoError=0,
LAAlreadyInUse,
@@ -116,7 +118,8 @@
LDNoConfig,
LDMounted,
MDMounted,
- LDMDInvalid
+ LDMDInvalid,
+ LDDeviceTooLarge,
};
struct ioctl_disk_config {
Modified: plus-branches/01-wait-sync-target/drbd/linux/drbd_config.h
===================================================================
--- plus-branches/01-wait-sync-target/drbd/linux/drbd_config.h 2004-08-31 12:07:15 UTC (rev 1522)
+++ plus-branches/01-wait-sync-target/drbd/linux/drbd_config.h 2004-08-31 12:08:29 UTC (rev 1523)
@@ -28,6 +28,26 @@
//#define DBG_ALL_SYMBOLS // no static functs, improves quality of OOPS traces
+//-------------------------------
+/*
+ * FIXME
+ * This is not yet understood.
+ * Seemingly DRBD and RedHat kernel do not like each other.
+ * Maybe the issue shows with other kernels too.
+ *
+ * In any case, we default to NOT using sendpage, to be on the safe side.
+ *
+ * Out tests with kernel.org/debian/SuSE 2.6. kernel showed no problems
+ * with sendpage, and it inceases performance.
+ *
+ * If you did your own tests, or you are a vendor and really know that it
+ * does not affect your kernel, comment it out.
+ *
+ */
+#define DRBD_DISABLE_SENDPAGE
+//-------------------------------
+
+
//#define DBG_SPINLOCKS // enables MUST_HOLD macro (assertions for spinlocks)
//#define DBG_ASSERTS // drbd_assert_breakpoint() function
//#define DUMP_MD 1 // Dump metadata to syslog upon connect
Modified: plus-branches/01-wait-sync-target/scripts/Makefile
===================================================================
--- plus-branches/01-wait-sync-target/scripts/Makefile 2004-08-31 12:07:15 UTC (rev 1522)
+++ plus-branches/01-wait-sync-target/scripts/Makefile 2004-08-31 12:08:29 UTC (rev 1523)
@@ -58,7 +58,7 @@
fi
install -m 755 drbddisk $(PREFIX)/etc/ha.d/resource.d
ifeq ($(DIST),suselike)
- ln -s ../etc/init.d/drbd $(PREFIX)/sbin/rcdrbd
+ ln -sf ../etc/init.d/drbd $(PREFIX)/sbin/rcdrbd
endif
@ echo
@ echo "Don't forget to run update-rc.d or chkconfig"
Modified: plus-branches/01-wait-sync-target/scripts/adjust_drbd_config_h.sh
===================================================================
--- plus-branches/01-wait-sync-target/scripts/adjust_drbd_config_h.sh 2004-08-31 12:07:15 UTC (rev 1522)
+++ plus-branches/01-wait-sync-target/scripts/adjust_drbd_config_h.sh 2004-08-31 12:08:29 UTC (rev 1523)
@@ -77,7 +77,7 @@
test -e ./linux/drbd_config.h.orig || cp ./linux/drbd_config.h{,.orig}
-perl -i -pe "
+perl -pe "
s{.*(#define SIGHAND_HACK.*)}
{ ( $need_sighand_hack ? '' : '//' ) . \$1}e;
s{.*(#define REDHAT_HLIST_BACKPORT.*)}
@@ -87,10 +87,13 @@
s{.*(#define HAVE_FIND_NEXT_BIT.*)}
{ ( $have_find_next_bit ? '' : '//' ) . \$1}e;
s{.*(#define HAVE_MM_INLINE_H.*)}
- { ( $have_mm_inline_h ? '' : '//' ) . \$1}e;" ./linux/drbd_config.h
+ { ( $have_mm_inline_h ? '' : '//' ) . \$1}e;" \
+ < ./linux/drbd_config.h \
+ > ./linux/drbd_config.h.new
-if ! DIFF=$(diff -s -U0 ./linux/drbd_config.h{.orig,}) ; then
+if ! DIFF=$(diff -s -U0 ./linux/drbd_config.h{,.new}) ; then
+ mv ./linux/drbd_config.h{.new,}
sed -e 's/^/ /' <<___
Adjusted drbd_config.h:
@@ -98,5 +101,6 @@
___
else
+ rm ./linux/drbd_config.h.new
echo -e "\n Using unmodified drbd_config.h\n"
fi
Modified: plus-branches/01-wait-sync-target/user/drbdsetup.c
===================================================================
--- plus-branches/01-wait-sync-target/user/drbdsetup.c 2004-08-31 12:07:15 UTC (rev 1522)
+++ plus-branches/01-wait-sync-target/user/drbdsetup.c 2004-08-31 12:08:29 UTC (rev 1523)
@@ -565,7 +565,9 @@
[LDNoConfig]="You have to use the disk command first.",
[LDMounted]="Lower device is already mounted.",
[MDMounted]="Meta device is already mounted.",
- [LDMDInvalid]="Lower device / meta device / index combination invalid."
+ [LDMDInvalid]="Lower device / meta device / index combination invalid.",
+ [LDDeviceTooLarge]="Currently we only support devices up to 2TB.\n"
+ "Contact office at linbit.com, if you need more.",
};
if (err_no>ARRY_SIZE(etext) || err_no<0) err_no=0;
More information about the drbd-cvs
mailing list