History log of /freebsd-10-stable/lib/libgeom/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
319303 31-May-2017 ngie

MFC r317311,r317312,r319019:

r317311:

Check for failures from getpagesize(3)

Return errno on failure, similar to the open(2) call above it.

CID: 1193753

r317312:

Fix type for `pagesize` to match the return type for getpagesize(3)
to fix the build

Pointyhat to: ngie

r319019:

Remove getpagesize(3) error checking added in r317312

getpagesize(3) no longer fails as of r317436.

319018 28-May-2017 ngie

MFC r317310,r317316:

r317310:

Minor style(9) fixups

Delete trailing whitespace and sort headers.

Leave libgeom.h's placement alone, per reasoning in r317289.

r317316:

Minor style(9) fixups

Delete trailing whitespace and sort headers.

Leave libgeom.h's placement alone, per reasoning in r317289.

319003 27-May-2017 ngie

MFC r317288,r317289:

r317288:

libgeom(3): apply minor polish

- Use .Dv when mentioning NULL per mdoc(7).
- Reword `g_device_path`, `g_open_by_ident`, and `g_providername`'s descriptions
so they're less wordy.
- Fix a typo in `g_device_path` (can not -> cannot).

Tested with: igor, make manlint

r317289:

libgeom(3): note that stdio.h is required when referencing gctl_dump(3)

gctl_dump(3) is only exposed when stdio.h is #include'd first, per its
addition in r112510. The reasoning noted for the conditional "exposure"
of the function was to "limit #include pollution".

This addresses an issue I found with the documentation when looking at
bug 218809, which in turn addresses a -Wimplicit-function-declaration
compiler warning in `tools/regression/geom_gpt/test.c` (it uses
gctl_dump(3)).

287792 14-Sep-2015 delphij

MFC r287247: Plug memory leaks when running out of memory.

Reported by: clang scan-build

286819 16-Aug-2015 mav

MFC r286719: Revert part of r280687, reporting "1" (true) for empty value.

For example, it made gpart partitions without label report "1" as label.

282222 29-Apr-2015 pfg

MFC r281875:
libgeom: plug memory leak in EndElement.

CID: 1016696
Found by: Clang static checker

281303 09-Apr-2015 mav

MFC r280687: Make GEOM_PART work in presence of previous withered self.

273145 15-Oct-2014 jhb

MFC 271721:
Explicitly specify MAP_SHARED when mapping the stats file descriptor.

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


253469 19-Jul-2013 scottl

Since there's no defined schema for the XML that's generated by the
kern.geom.confxml sysctl, it's silly to warn about tags in libgeom,
especially since libgeom exists simply to build a tree out of the conf
information.

Obtained from: Netflix
MFC after: 3 days


253249 12-Jul-2013 hrs

Revert r253247. This change should be improved based on a lesson learnt
from r233646 first.

Pointed out by: jmallett


253247 12-Jul-2013 hrs

Use strtoumax() instead of strtoul() for id/ref attr in XML elements.
This improves compatibility when running an ILP32 binary on LP64 kernel.

Spotted by: gjb


242130 26-Oct-2012 jh

Improve libgeom XML parsing error handling.

- Abort parsing and return an error if we run out of memory.
- Return EILSEQ from geom_xml2tree() for XML syntax errors.

Silence on: freebsd-geom


234107 10-Apr-2012 jmallett

Back out r233646. Although it fixed most libgeom consumers under 32-bit
compatibility, it broke programs using devstat, under 32-bit compatibility and
not.

It's very difficult to fix the identifiers used by devstat, so this change is
simply being backed out. Since changes to 3rd-party code seem likely, and may be
necessary to properly fix 32-bit binaries on 64-bit kernel, it would seem better
to make more invasive changes to fix GEOM's problems with 32-bit compatibility in
general.

The right thing to do is to replace all of the use of pointers as opaque
identifiers with a fixed-size (64-bit or even 32-bit should be enough for tracking
unique GEOM elments) field. That probably maintains source compatibility with
most GEOM consumers, and allows xml2tree to make better assumptions about how to
decode the identifiers.

Submitted by: Anton Yuzhaninov


233646 29-Mar-2012 jmallett

Fix 32-bit libgeom consumers run on 64-bit kernels with COMPAT_FREEBSD32.

Kernel pointer values are used as opaque unique identifiers, which are then
used to reconstruct references between various providers, classes, etc., inside
libgeom from the source XML. Unfortunately, they're converted to pointer-width
integers (in the form of pointers) to do this, and 32-bit userland pointers
cannot hold sensible representations (however opaque) of 64-bit kernel pointers
on all systems.

In the case where the leading bits are zero and 32 distinct bits of pointer can
be identified, this will happen to work. On systems where the upper 32-bits of
kernel pointers are non-zero and the same for all kernel pointers, this will
result in double frees and all kinds of bizarre crashes and linkage between
objects inside libgeom.

To mitigate this problem, treat the opaque identifiers in the XML as C strings
instead, and internalize them to give unique and consistent per-object pointer
values in userland for each identifier in the XML. This allows us to keep the
libgeom logic the same with only minor changes to initial setup and parsing.

It might be more sensible for speed reasons to treat the identifiers as numbers
of a large size (uintmax_t, say) rather than strings, but strings seem fine for
now.

(As an added side-effect, this makes it slightly easier to identify unresolved
references, but nothing has been added to inform the user of those.)


216177 04-Dec-2010 jh

Remove stale link.

PR: 151252


214129 21-Oct-2010 pjd

Remove code duplication by introducing static gctl_param_add() function which
is now used by both gctl_ro_param() and gctl_rw_param().


214128 21-Oct-2010 pjd

- Simplify gctl_get_handle() a bit.
- Prefer 'unsigned int' over 'u_int' in userland code.


213451 05-Oct-2010 emaste

Handle null return from XML_ParserCreate and fix a few memory leaks on
error conditions.

Submitted by: Mark Johnston <mjohnston at sandvine dot com>
MFC after: 2 weeks


211397 16-Aug-2010 joel

Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki while
translating these manual pages. Minor corrections by me.

Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>


202458 17-Jan-2010 delphij

Correct a typo (when we talk about offset, it should
be offset, not size).

Submitted by: pluknet at gmail com


202454 17-Jan-2010 delphij

Expose stripe offset and stripe size through libgeom and geom(8) userland
utilities.

Reviewed by: pjd, mav (earlier version)


201320 31-Dec-2009 ed

Add missing `void' keyword.


192376 19-May-2009 trasz

Add links to libgeom(3) where appropriate.


182863 08-Sep-2008 lulf

- Update the libgeom manpage with a description of g_device_path and
g_providername utility functions.

Approved by: kib (mentor)


182843 07-Sep-2008 lulf

- Add a new ioctl for getting the provider name of a geom provider.
- Add a routine for looking up a device and checking if it is a valid geom
provider given a partial or full path to its device node.

Reviewed by: phk
Approved by: pjd (mentor)


181463 09-Aug-2008 des

Add sbuf_new_auto as a shortcut for the very common case of creating a
completely dynamic sbuf.

Obtained from: Varnish
MFC after: 2 weeks


180369 08-Jul-2008 lulf

- Simplify the procedure of retrieving XML-data from the kernel.
- Fix a number of potential memory leaks in libgeom related to doing realloc
without freeing old pointer if things go wrong.
- Fix a number of places in libgeom where malloc and calloc return values
were not checked.
- Check malloc return value and provide sufficient warning messages when XML
parsing fails.

PR: kern/83464
Submitted by: Dan Lukes <dan - at - obluda.cz>
Approved by: kib (mentor)


179780 13-Jun-2008 thompsa

Fix spelling.

PR: docs/124561
Submitted by: Sam Banks


179152 20-May-2008 pjd

Use 'dowrite' as an argument name instead of too general 'write'.


169305 06-May-2007 des

Remove parameter names from prototypes to avoid namespace issues.


169299 06-May-2007 pjd

Implement and document some utility functions that can be used to communicate
with GEOM providers.

OK'ed by: phk


169162 01-May-2007 wkoszek

Second call of sysctl() is used to gather a proper size of a memory chunk
needed to hold the GEOM tree. At this point, pointer 'p' has an improper
value (as it was used previously), and we're getting EFAULT. Fix this
functionality by passing NULL instead of 'p'.

This fixes mdconfig(8) -l output with high number of md(4) devices.

Found by: kris
Reviewed by: phk


152760 24-Nov-2005 ru

Fix prototype.


146561 24-May-2005 phk

Check for NULL pointer return.

Spotted by: marcus


131421 01-Jul-2004 ru

Markup, grammar, punctuation.


126786 09-Mar-2004 jhb

Make libgeom usable by C++ programs:
- Add DECL wrappers to libgeom.h.
- Rename structure members in libgeom.h to use a lg_ prefix for member
names. This is required because a few structures had members named
'class' which made g++ very unhappy.
- Catch gstat(8) and gconcat(8) up to these API changes.

Reviewed by: phk


126748 08-Mar-2004 phk

String the consumers into the list of the provider they are attached to.

Noticed by: jhb


126721 07-Mar-2004 phk

Add manpages for the gctl API.

Submitted by: le
Tweaks by: phk


119071 18-Aug-2003 obrien

style.Makefile(5)


119017 17-Aug-2003 gordon

Stage 3 of dynamic root support. Make all the libraries needed to run
binaries in /bin and /sbin installed in /lib. Only the versioned files
reside in /lib, the .so symlink continues to live /usr/lib so the
toolchain doesn't need to be modified.


117979 24-Jul-2003 markm

Remove GCC-specific debugging option.

OK'ed by: phk


116549 18-Jun-2003 charnier

The .Fn function


115625 01-Jun-2003 phk

Add the part of the last commit which cvs appearantly didn't like
the first time.


115104 17-May-2003 ru

Moved libgeom.so dependencies to where they belong.

Reviewed by: phk
Approved by: re (scottl)


113861 22-Apr-2003 phk

Collapse the meta arguments into normal arguments, trying to distinguish
just makes our own life harder.


112709 27-Mar-2003 phk

Run a revision on the OAM api.

Use prefix gctl_ systematically.
Add flag with access perms for each argument.
Add ro/rw versions of argument building functions.
General cleanup.


112510 23-Mar-2003 phk

Add marshalling functions for OAM api.


112372 18-Mar-2003 phk

Use devstat instead of GEOM private statistics structure.


112340 17-Mar-2003 phk

Constify arg to geom_lookupid().

Improve a diagnostic printf.


111447 24-Feb-2003 ru

mdoc(7) police: Scheduled sweep.


110810 13-Feb-2003 phantom

Add appropriate MLINKS for functions documented in libgeom.3


110809 13-Feb-2003 phantom

Fix some mdoc issues: add .Nd to NAME section, use valid .Lb argument,
use .Fn there appropriate


110603 10-Feb-2003 phk

Leak more stuff into libgeom.


110548 08-Feb-2003 phk

Lower WARNS to 3 until I track down a way to explain that I know what
I'm doing to sparc64's gcc


110547 08-Feb-2003 phk

Include <sys/time.h>, it's not the users problem that we use bintime
internally.


110545 08-Feb-2003 phk

Add libgeom to the system.

Initially this only contains the functions for accessing the I/O
statistics data.