<commit_before>#!/bin/bash
set -e

: ${RBD_IMAGE:=image0}
: ${RBD_POOL:=rbd}
: ${RBD_OPTS:=rw}
: ${RBD_FS:=xfs}
: ${RBD_TARGET:=/mnt/rbd}

# Make sure the mountpoint exists
mkdir -p ${RBD_TARGET}

# Map the rbd volume
/usr/bin/rbd map ${RBD_IMAGE} --pool ${RBD_POOL} -o ${RBD_OPTS}

# Get rbd device
MOUNT_DEV=$( /usr/bin/rbd showmapped | grep -m 1 -E "^[0-9]{1,3}\s+${RBD_POOL}\s+${RBD_IMAGE}" | awk '{print $5}' )

# Mount and wait for exit signal (after which, unmount and exit)
/mountWait -rbddev ${MOUNT_DEV} -fstype ${RBD_FS} -target ${RBD_TARGET}
<commit_msg>rbd-volume: provide mount options to mountWait<commit_after>#!/bin/bash
set -e

: ${RBD_IMAGE:=image0}
: ${RBD_POOL:=rbd}
: ${RBD_OPTS:=rw}
: ${RBD_FS:=xfs}
: ${RBD_TARGET:=/mnt/rbd}

# Make sure the mountpoint exists
mkdir -p ${RBD_TARGET}

# Map the rbd volume
/usr/bin/rbd map ${RBD_IMAGE} --pool ${RBD_POOL} -o ${RBD_OPTS}

# Get rbd device
MOUNT_DEV=$( /usr/bin/rbd showmapped | grep -m 1 -E "^[0-9]{1,3}\s+${RBD_POOL}\s+${RBD_IMAGE}" | awk '{print $5}' )

# Mount and wait for exit signal (after which, unmount and exit)
/mountWait -rbddev ${MOUNT_DEV} -fstype ${RBD_FS} -target ${RBD_TARGET} -o ${RBD_OPTS}

{'fraction_non_alphanumeric': 0.19830508474576272, 'fraction_numerical': 0.011864406779661017, 'mean_word_length': 4.623809523809523, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2326191', 'n_tokens_mistral': 550, 'n_tokens_neox': 527, 'n_words': 125}