ocfs2-tools/libocfs2-Change-asserts-to-error.patch
Goldwyn Rodrigues ab40e465fc Accepting request 196156 from home:goldwynr:branches:network:ha-clustering:Factory
- Make mount.ocfs2 load modules and write cluster_stack:
  + 0007-mount.ocfs2-performs-module-loading-cluster_stack-se.patch

- Mark o2cb.ocf as obsolete. Anyone using o2cb.ocf will get an
  info message stating so.

- The nocontrold effort (added nocontrold patches and disabled
  corosync-2.3 controld compatibility patches): 
  + 0001-libo2cb-Remove-controld-actions-from-group-join-leav.patch
  + 0002-libo2cb-Remove-rest-of-controld-functions.patch
  + 0003-Get-cluster-name-from-corosync-cmap.patch
  + 0004-Remove-controld-structures-from-debugfs.ocfs2.patch
  + 0005-Check-for-DLM-kernel-version-in-user_begin_group_joi.patch
  + 0006-Add-cmap-and-dlm-libraries-in-the-tools.patch
  - 0001-Remove-pacemaker-ais-stuff.patch
  - 0002-Add-corosync-cfg-to-get-configuration-information.patch
  - 0003-Remove-daemon-protocol-versions-and-consolidate-fs-v.patch
  - 0005-Add-cluster_name-and-stack-name.patch

- libocfs2-Change-asserts-to-error.patch: Return control to 
  fsck.ocfs2 instead of erring

OBS-URL: https://build.opensuse.org/request/show/196156
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/ocfs2-tools?expand=0&rev=64
2013-08-24 04:21:23 +00:00

24 lines
1011 B
Diff

While running fsck.ocfs2, if an assert is met, fsck.ocfs2 terminates.
This error is still recoverable, because the index of the directory
can be rebuilt. Converting the asserts to an error would return
control to fsck.
Index: ocfs2-tools-1.8.2+git.1361836695.ff84eb5/libocfs2/dir_indexed.c
===================================================================
--- ocfs2-tools-1.8.2+git.1361836695.ff84eb5.orig/libocfs2/dir_indexed.c 2013-04-02 04:38:06.444732480 -0500
+++ ocfs2-tools-1.8.2+git.1361836695.ff84eb5/libocfs2/dir_indexed.c 2013-08-13 09:37:35.120453200 -0500
@@ -1436,9 +1436,11 @@ errcode_t ocfs2_dx_dir_search(ocfs2_file
entry_list = &dx_leaf->dl_list;
}
- assert(entry_list->de_count > 0);
- assert(entry_list->de_num_used > 0);
- assert(dx_root->dr_num_entries > 0);
+ if ((entry_list->de_count == 0) || (entry_list->de_num_used == 0) ||
+ (dx_root->dr_num_entries == 0)) {
+ ret = OCFS2_ET_DIR_CORRUPTED;
+ goto out;
+ }
ret = ocfs2_malloc_block(fs->fs_io, &dir_buf);
if (ret)