Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-20462 Lustre Find Utility (LFU)
  3. LU-20603

LFU: llapi namespace scanner API emitting per-object records to a consumer callback

XMLWordPrintable

    • Icon: Technical task Technical task
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None
    • 3
    • 9223372036854775807

      LFU starts client-side so the record contents and the consumer API are settled before any kernel or wire-protocol work is committed to.

      Most of the crawler is already in tree: LU-17814 landed `liblustreapi_pfind.c` — threaded traversal, attributes via`LL_IOC_MDC_GETINFO_V2`, `statx()` fallback — and `llapi_find_with_cb()` /`llapi_find_cb_t` are exported. This is not a new crawler, but a callback thatfills a per-object record instead of printing.

      New `lustre/utils/liblustreapi_scan.c`:

      struct llapi_scan_rec;                  /* one object: FID, attrs, layout */
      typedef int (*llapi_scan_cb_t)(const struct llapi_scan_rec *rec, void *data);
      int llapi_scan_namespace(const char *path, struct llapi_scan_param *param,
                               llapi_scan_cb_t cb, void *data);
      

      Exported by the existing `llapi_*` rule in `liblustreapi.map`; man page in `Documentation/man3/`. Named for what it does rather than for the programme, since renaming an exported symbol later is an ABI event.

      Its own ticket because the scanner has several queued consumers — `lfs find` first, then the PCC-RO and Trash Can cleanup tools, FLR/EC resync, HSM — and each should be landable on its own.

      Scope: this defines an in-memory record and a callback contract, not a serialization. The Object Stream format is still open between FlatBuffers and Cap'n Proto, so nothing here should freeze it.

      Review note: pushed as one stacked Gerrit series with the `lfs find`
      conversion, so the API's first caller is visible in the same push.

            hnishida Hiroshi Nishida
            hnishida Hiroshi Nishida
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: