Skip to content

Instantly share code, notes, and snippets.

View Panky-codes's full-sized avatar
💻
I like to count from 0 and not 1.

Pankaj Raghav Panky-codes

💻
I like to count from 0 and not 1.
View GitHub Profile
@Panky-codes
Panky-codes / custom-kernel.nix
Last active June 11, 2024 14:23
Building custom kernel in NixOS
{ pkgs, ... }:
# Modified version of pkgs.linuxPackages_custom to accept kernelPatches
let
customPackage = { version, src, configfile, modDirVersion ? pkgs.lib.versions.pad 3 version, kernelPatches ? [ ], allowImportFromDerivation ? true }:
pkgs.lib.recurseIntoAttrs (pkgs.linuxPackagesFor (pkgs.linuxManualConfig {
inherit version src configfile modDirVersion kernelPatches allowImportFromDerivation;
}));
in
@Panky-codes
Panky-codes / xfstest.nix
Last active April 23, 2024 13:21
nix config for running custom xfstests with custom xfsprogs
# To get a nix shell with this environment, run:
# $ nix-shell -A xfs_65 xfstests.nix
# $ [nix-shell:~]# xfstests-check -s <section-name> <testpath>
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
let
packages = rec {
@Panky-codes
Panky-codes / gist:5da03618792c10e0047d85f20004e000
Created December 8, 2023 09:29
6.6.0-rc5 xfs/057 xfs-reflink-nrext64
[11041.137862] XFS (loop5): Unmounting Filesystem 3d33ea8d-8e42-4cbf-b6dc-8d644c29250d
[11238.259832] INFO: task umount:2385431 blocked for more than 120 seconds.
[11238.260532] Not tainted 6.6.0-rc5 #1
[11238.260952] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[11238.261715] task:umount state:D stack:0 pid:2385431 ppid:2385097 flags:0x00004002
[11238.262422] Call Trace:
[11238.262718] <TASK>
[11238.262980] __schedule+0x3c5/0xae0
[11238.263338] schedule+0x5d/0xe0
[11238.263674] xfs_ail_push_all_sync+0x9a/0xf0 [xfs]
@Panky-codes
Panky-codes / gist:81759e9c075d8b94a115c23a1a8501e3
Created November 9, 2023 15:07
xfs/013 crash xfs-reflink-nrext64
[12326.099052] kernel BUG at fs/xfs/xfs_message.c:102!
[12326.099630] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
[12326.100288] CPU: 5 PID: 2278442 Comm: kworker/5:12 Not tainted 6.6.0-rc5 #1
[12326.100977] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
[12326.101943] Workqueue: xfs-inodegc/loop5 xfs_inodegc_worker [xfs]
[12326.103426] RIP: 0010:assfail+0x34/0x40 [xfs]
[12326.104117] Code: c9 48 c7 c2 90 52 17 c1 48 89 f1 48 89 fe 48 c7 c7 d8 65 16 c1 e8 7c fd ff ff 80 3d 05 0a 09 00 00 75 07 0f 0b c3 cc cc cc cc <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90
[12326.106019] RSP: 0018:ffffb48c41213c78 EFLAGS: 00010202
[12326.106648] RAX: 0000000000000000 RBX: ffff8d68159656a8 RCX: 000000007fffffff
[12326.107399] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffffc11665d8
@Panky-codes
Panky-codes / vmctl.yaml
Last active November 14, 2022 08:50
Ansible role for VMCTL provisioning
---
- name: Clone vmctl
git:
repo: https://github.com/OpenMPDK/vmctl.git
dest: /home/panky/SW/tools/vmctl
- name: Create .local bin dir
ansible.builtin.file:
path: /home/panky/.local/bin
state: directory