Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Feb 2009 22:18:16 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/geom/part g_part.c g_part.h g_part_if.m
Message-ID:  <200902152218.n1FMIQQY060435@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
marcel      2009-02-15 22:18:16 UTC

  FreeBSD src repository

  Modified files:
    sys/geom/part        g_part.c g_part.h g_part_if.m 
  Log:
  SVN rev 188659 on 2009-02-15 22:18:16Z by marcel
  
  Add method precheck to the g_part interface. The precheck
  method allows schemes to reject the ctl request, pre-check
  the parameters and/or modify/set parameters. There are 2
  use cases that triggered the addition:
  1.  When implementing a R/O scheme, deletes will still
      happen to the in-memory representation. The scheme is
      not involved in that operation. The pre-check method
      can be used to fail the delete up-front. Without this
      the write to disk will typically fail, but at that
      time the delete already happened.
  2.  The EBR scheme uses a linked list to record slices.
      There's no index. The EBR scheme defines the index
      as a function of the start LBA of the partition. The
      add verb picks an index for the range and then invokes
      the add method of the scheme to fill in the blanks. It
      is too late for the add method to change the index.
      The pre-check is used to set the index up-front. This
      also (silently) overrides/nullifies any (pointless)
      user-specified index value.
  
  Revision  Changes    Path
  1.31      +13 -20    src/sys/geom/part/g_part.c
  1.13      +17 -0     src/sys/geom/part/g_part.h
  1.5       +13 -0     src/sys/geom/part/g_part_if.m



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902152218.n1FMIQQY060435>